Update .clang-format to update the comment, macro and assignment formatting

This commit is contained in:
Maschell 2022-02-03 15:51:47 +01:00
parent 6db316c682
commit cd18ab16a6
7 changed files with 99 additions and 101 deletions

View File

@ -2,7 +2,8 @@
BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: None
AlignConsecutiveAssignments: Consecutive
AlignConsecutiveMacros: AcrossEmptyLinesAndComments
AlignOperands: Align
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
@ -56,7 +57,7 @@ SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 0
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false

View File

@ -7,7 +7,7 @@
uint32_t moduleLogInit = false;
uint32_t cafeLogInit = false;
uint32_t udpLogInit = false;
#endif// DEBUG
#endif // DEBUG
void initLogging() {
#ifdef DEBUG
@ -15,7 +15,7 @@ void initLogging() {
cafeLogInit = WHBLogCafeInit();
udpLogInit = WHBLogUdpInit();
}
#endif// DEBUG
#endif // DEBUG
}
void deinitLogging() {
@ -32,5 +32,5 @@ void deinitLogging() {
WHBLogUdpDeinit();
udpLogInit = false;
}
#endif// DEBUG
#endif // DEBUG
}

View File

@ -31,14 +31,13 @@ typedef struct _memory_mapping_t {
const memory_values_t *physical_addresses;
} memory_mapping_t;
// clang-format off
#define SEGMENT_UNIQUE_ID 0x00AABBCC // Unique ID. Chosen arbitrary.
#define PAGE_INDEX_SHIFT (32-15)
#define PAGE_INDEX_SHIFT (32 - 15)
#define PAGE_INDEX_MASK ((1 << (28 - PAGE_INDEX_SHIFT)) - 1)
#define MEMORY_START_BASE 0x80000000
#define MEMORY_START_VIDEO_BASE (MEMORY_START_BASE + 0x08000000)
// clang-format on
// clang-format off
const memory_values_t mem_vals_heap_1[] = {
@ -118,10 +117,8 @@ const memory_values_t mem_vals_video[] = {
};
// clang-format on
// clang-format off
#define MEMORY_START_VIDEO MEMORY_START_VIDEO_BASE
#define MEMORY_END_VIDEO (MEMORY_START_VIDEO + 0xE60000)
// clang-format on
// clang-format off
const memory_mapping_t mem_mapping[] = {