Skip to content

Commit

Permalink
Merge remote-tracking branch 'OFW/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
xMasterX committed Jul 16, 2024
2 parents 4a23ed7 + 79d82da commit 3ed62e3
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 26 deletions.
22 changes: 13 additions & 9 deletions .sublime-project
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,20 @@
}
],
"settings": {
"LSP": {
"clangd": {
"initializationOptions": {
"clangd.compile-commands-dir": "build/latest",
"clangd.header-insertion": "never",
"clangd.query-driver": "**",
"clangd.clang-tidy": true,
},
"LSP": {
"clangd": {
"enabled": true,
"initializationOptions": {
// Use with toolchain version 39+
// Set `"binary": "custom",` option in LSP-clangd config to use toolchain clangd
// "custom_command": ["toolchain/current/bin/clangd"],

"clangd.compile-commands-dir": "build/latest",
"clangd.header-insertion": "never",
"clangd.query-driver": "**/arm-none-eabi-*",
"clangd.clang-tidy": true,
},
},
},
},
},
}
8 changes: 3 additions & 5 deletions .vscode/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/c_cpp_properties.json
/extensions.json
/launch.json
/settings.json
/tasks.json
*
!example/
!ReadMe.md
2 changes: 1 addition & 1 deletion .vscode/example/settings.json.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"SConstruct": "python",
"*.fam": "python"
},
"clangd.path": "${workspaceFolder}/toolchain/current/bin/clangd@FBT_PLATFORM_EXECUTABLE_EXT@",
// "clangd.path": "${workspaceFolder}/toolchain/current/bin/clangd@FBT_PLATFORM_EXECUTABLE_EXT@",
"clangd.arguments": [
"--query-driver=**/arm-none-eabi-*",
"--compile-commands-dir=${workspaceFolder}/build/latest",
Expand Down
1 change: 1 addition & 0 deletions applications/main/infrared/resources/infrared/assets/tv.ir
Original file line number Diff line number Diff line change
Expand Up @@ -3563,3 +3563,4 @@ type: parsed
protocol: NEC
address: 40 00 00 00
command: 17 00 00 00

21 changes: 11 additions & 10 deletions scripts/ufbt/project_template/.clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ AlignConsecutiveAssignments:
AlignFunctionPointers: false
PadOperators: true
AlignConsecutiveBitFields:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
Enabled: true
AcrossEmptyLines: true
AcrossComments: true
AlignCompound: false
AlignFunctionPointers: false
PadOperators: true
Expand All @@ -25,10 +25,10 @@ AlignConsecutiveDeclarations:
AlignFunctionPointers: false
PadOperators: true
AlignConsecutiveMacros:
Enabled: false
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AcrossComments: true
AlignCompound: true
AlignFunctionPointers: false
PadOperators: true
AlignConsecutiveShortCaseStatements:
Expand All @@ -47,7 +47,7 @@ AllowBreakBeforeNoexceptSpecifier: Never
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortCompoundRequirementOnASingleLine: true
AllowShortEnumsOnASingleLine: true
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortLambdasOnASingleLine: All
Expand Down Expand Up @@ -108,6 +108,7 @@ ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
- M_EACH
IfMacros:
- KJ_IF_MAYBE
IncludeBlocks: Preserve
Expand Down Expand Up @@ -136,7 +137,7 @@ IndentRequiresClause: false
IndentWidth: 4
IndentWrappedFunctionNames: true
InsertBraces: false
InsertNewlineAtEOF: false
InsertNewlineAtEOF: true
InsertTrailingCommas: None
IntegerLiteralSeparator:
Binary: 0
Expand Down Expand Up @@ -179,7 +180,7 @@ ReferenceAlignment: Pointer
ReflowComments: false
RemoveBracesLLVM: false
RemoveParentheses: Leave
RemoveSemicolon: false
RemoveSemicolon: true
RequiresClausePosition: OwnLine
RequiresExpressionIndentation: OuterScope
SeparateDefinitionBlocks: Leave
Expand Down Expand Up @@ -226,7 +227,7 @@ SpacesInParensOptions:
InEmptyParentheses: false
Other: false
SpacesInSquareBrackets: false
Standard: c++03
Standard: c++20
StatementAttributeLikeMacros:
- Q_EMIT
StatementMacros:
Expand Down
2 changes: 1 addition & 1 deletion scripts/ufbt/project_template/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
},
"clangd.path": "@UFBT_TOOLCHAIN_CLANGD@",
// "clangd.path": "@UFBT_TOOLCHAIN_CLANGD@",
"clangd.arguments": [
"--query-driver=**/arm-none-eabi-*",
"--compile-commands-dir=${workspaceFolder}/.vscode",
Expand Down
6 changes: 6 additions & 0 deletions targets/f7/furi_hal/furi_hal_interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@

#define FURI_HAL_INTERRUPT_DEFAULT_PRIORITY (configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY + 5)

#ifdef FURI_RAM_EXEC
#define FURI_HAL_INTERRUPT_ACCOUNT_START()
#define FURI_HAL_INTERRUPT_ACCOUNT_END()
#else
#define FURI_HAL_INTERRUPT_ACCOUNT_START() const uint32_t _isr_start = DWT->CYCCNT;
#define FURI_HAL_INTERRUPT_ACCOUNT_END() \
const uint32_t _time_in_isr = DWT->CYCCNT - _isr_start; \
furi_hal_interrupt.counter_time_in_isr_total += _time_in_isr;
#endif

typedef struct {
FuriHalInterruptISR isr;
Expand Down Expand Up @@ -372,6 +377,7 @@ void LPUART1_IRQHandler(void) {
furi_hal_interrupt_call(FuriHalInterruptIdLpUart1);
}

// Potential space-saver for updater build
const char* furi_hal_interrupt_get_name(uint8_t exception_number) {
int32_t id = (int32_t)exception_number - 16;

Expand Down

0 comments on commit 3ed62e3

Please sign in to comment.