Merge branch 'main' into bugfix/bsp-draw-bitmap-padding
This commit is contained in:
@@ -23,7 +23,7 @@ This way we can keep the code clean.
|
||||
## Style Guide
|
||||
To maintain a consistent and clean codebase, follow the [style guide](docs/style_guide.md). This document provides detailed instructions on naming conventions, code structure, and commenting practices.
|
||||
|
||||
Please read the [style_guide.md](style_guide.md) carefully before making contributions.
|
||||
Please read the [style_guide.md](docs/style_guide.md) carefully before making contributions.
|
||||
|
||||
### Editor Configuration
|
||||
|
||||
@@ -57,4 +57,7 @@ Documentation is placed in the [docs](docs) folder.
|
||||
If your part needs documentation (e.g. how to use tcp cmd interface), add a markdown file in the above-mentioned folder.
|
||||
|
||||
This folder contains the following documents:
|
||||
- [llfs.md](docs/llfs.md): Linked List File System
|
||||
- [logger.md](docs/logger.md): Logging and Debugging Messages
|
||||
- [mkllfs.md](docs/mkllfs.md): Make Linked List File System
|
||||
- [style_guide.md](docs/style_guide.md): Style Guide
|
||||
69
project/.clang-format
Normal file
69
project/.clang-format
Normal file
@@ -0,0 +1,69 @@
|
||||
---
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveMacros: true
|
||||
AlignConsecutiveAssignments: false
|
||||
AlignConsecutiveDeclarations: false
|
||||
AlignEscapedNewlines: Left
|
||||
AlignOperands: true
|
||||
AlignTrailingComments: true
|
||||
AllowAllArgumentsOnNextLine: false
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
AllowShortBlocksOnASingleLine: false
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: None
|
||||
AllowShortIfStatementsOnASingleLine: Never
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
BinPackArguments: true
|
||||
BinPackParameters: false
|
||||
BreakBeforeBinaryOperators: NonAssignment
|
||||
BreakBeforeBraces: Attach
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakStringLiterals: true
|
||||
ColumnLimit: 120
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
DerivePointerAlignment: false
|
||||
DisableFormat: false
|
||||
ExperimentalAutoDetectBinPacking: false
|
||||
IncludeBlocks: Preserve
|
||||
IncludeCategories:
|
||||
- Regex: "^<(.*)>"
|
||||
Priority: 0
|
||||
- Regex: ^"(.*)"
|
||||
Priority: 1
|
||||
- Regex: "(.*)"
|
||||
Priority: 2
|
||||
IncludeIsMainRegex: "(_test)?$"
|
||||
IndentCaseLabels: true
|
||||
IndentPPDirectives: None
|
||||
IndentWidth: 4
|
||||
IndentWrappedFunctionNames: false
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
Language: Cpp
|
||||
MaxEmptyLinesToKeep: 1
|
||||
PenaltyBreakAssignment: 2
|
||||
PenaltyBreakBeforeFirstCallParameter: 19
|
||||
PenaltyBreakComment: 300
|
||||
PenaltyBreakFirstLessLess: 120
|
||||
PenaltyBreakString: 1000
|
||||
PenaltyBreakTemplateDeclaration: 10
|
||||
PenaltyExcessCharacter: 1000000
|
||||
PenaltyReturnTypeOnItsOwnLine: 1000
|
||||
PointerAlignment: Left
|
||||
ReflowComments: true
|
||||
SortIncludes: true
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceAfterLogicalNot: false
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
TabWidth: 4
|
||||
UseTab: Never
|
||||
UseCRLF: false
|
||||
...
|
||||
@@ -7,17 +7,16 @@
|
||||
|
||||
#include <string.h>
|
||||
#define LOGGER_LEVEL_WARN
|
||||
#include "log.h"
|
||||
#include "llfs.h"
|
||||
#include "log.h"
|
||||
|
||||
extern struct llfs_data_file *llfs_root;
|
||||
extern struct llfs_data_file* llfs_root;
|
||||
const char* TAG = "llfs";
|
||||
|
||||
|
||||
// TODO: Implement file extension filter
|
||||
size_t llfs_file_list(llfs_file_t *file_list, size_t max_files, char* filter) {
|
||||
size_t llfs_file_list(llfs_file_t* file_list, size_t max_files, char* filter) {
|
||||
size_t file_count = 0;
|
||||
const struct llfs_data_file *file = llfs_root;
|
||||
const struct llfs_data_file* file = llfs_root;
|
||||
|
||||
LOG_DEBUG(TAG, "Getting file list with filter: %s", filter);
|
||||
|
||||
@@ -33,15 +32,15 @@ size_t llfs_file_list(llfs_file_t *file_list, size_t max_files, char* filter) {
|
||||
return file_count;
|
||||
}
|
||||
|
||||
llfs_file_t *llfs_file_open(const char *name) {
|
||||
const struct llfs_data_file *file = llfs_root;
|
||||
llfs_file_t* llfs_file_open(const char* name) {
|
||||
const struct llfs_data_file* file = llfs_root;
|
||||
|
||||
LOG_DEBUG(TAG, "Opening file: %s", name);
|
||||
|
||||
while (file != NULL) {
|
||||
if (strcmp(file->name, name) == 0) {
|
||||
LOG_DEBUG(TAG, "File found: %s, size: %d", file->name, file->len);
|
||||
return (llfs_file_t *) file;
|
||||
return (llfs_file_t*)file;
|
||||
}
|
||||
file = file->next;
|
||||
}
|
||||
@@ -49,4 +48,3 @@ llfs_file_t *llfs_file_open(const char *name) {
|
||||
LOG_DEBUG(TAG, "File not found: %s", name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user