mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-24 05:34:45 -07:00
[FL-3867] Code formatting update (#3765)
* clang-format: AllowShortEnumsOnASingleLine: false * clang-format: InsertNewlineAtEOF: true * clang-format: Standard: c++20 * clang-format: AlignConsecutiveBitFields * clang-format: AlignConsecutiveMacros * clang-format: RemoveParentheses: ReturnStatement * clang-format: RemoveSemicolon: true * Restored RemoveParentheses: Leave, retained general changes for it * formatting: fixed logging TAGs * Formatting update for dev Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -6,15 +6,15 @@
|
||||
|
||||
#ifdef LEVEL_DURATION_BIG
|
||||
|
||||
#define LEVEL_DURATION_RESET 0U
|
||||
#define LEVEL_DURATION_LEVEL_LOW 1U
|
||||
#define LEVEL_DURATION_RESET 0U
|
||||
#define LEVEL_DURATION_LEVEL_LOW 1U
|
||||
#define LEVEL_DURATION_LEVEL_HIGH 2U
|
||||
#define LEVEL_DURATION_WAIT 3U
|
||||
#define LEVEL_DURATION_RESERVED 0x800000U
|
||||
#define LEVEL_DURATION_WAIT 3U
|
||||
#define LEVEL_DURATION_RESERVED 0x800000U
|
||||
|
||||
typedef struct {
|
||||
uint32_t duration : 30;
|
||||
uint8_t level : 2;
|
||||
uint8_t level : 2;
|
||||
} LevelDuration;
|
||||
|
||||
static inline LevelDuration level_duration_make(bool level, uint32_t duration) {
|
||||
@@ -54,7 +54,7 @@ static inline uint32_t level_duration_get_duration(LevelDuration level_duration)
|
||||
|
||||
#else
|
||||
|
||||
#define LEVEL_DURATION_RESET 0U
|
||||
#define LEVEL_DURATION_RESET 0U
|
||||
#define LEVEL_DURATION_RESERVED 0x800000U
|
||||
|
||||
typedef int32_t LevelDuration;
|
||||
@@ -68,11 +68,11 @@ static inline LevelDuration level_duration_reset() {
|
||||
}
|
||||
|
||||
static inline bool level_duration_is_reset(LevelDuration level_duration) {
|
||||
return (level_duration == LEVEL_DURATION_RESET);
|
||||
return level_duration == LEVEL_DURATION_RESET;
|
||||
}
|
||||
|
||||
static inline bool level_duration_get_level(LevelDuration level_duration) {
|
||||
return (level_duration > 0);
|
||||
return level_duration > 0;
|
||||
}
|
||||
|
||||
static inline uint32_t level_duration_get_duration(LevelDuration level_duration) {
|
||||
|
||||
Reference in New Issue
Block a user