Skip to content

Commit

Permalink
Align formatting with CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Scheremo committed Aug 6, 2024
1 parent 98decb7 commit 9d6195e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
7 changes: 7 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
IndentWidth: 4
ColumnLimit: 100
AlignEscapedNewlines: DontAlign
SortIncludes: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
18 changes: 9 additions & 9 deletions hal/inc/device_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
typedef bool (*chi_device_callback)(struct chi_device *device);

typedef struct chi_device_api {
int (*open)(struct chi_device *device);
int (*close)(struct chi_device *device);
ssize_t (*read_async)(struct chi_device *device, void *buffer, uint32_t size,
chi_device_callback cb);
ssize_t (*write_async)(struct chi_device *device, const void *buffer,
uint32_t size, chi_device_callback cb);
int (*open)(struct chi_device *device);
int (*close)(struct chi_device *device);
ssize_t (*read_async)(struct chi_device *device, void *buffer, uint32_t size,
chi_device_callback cb);
ssize_t (*write_async)(struct chi_device *device, const void *buffer, uint32_t size,
chi_device_callback cb);
} chi_device_api_t;

typedef struct chi_device {
struct chi_device_api *api; // function pointers
uint32_t *device_addr;
void *cfg;
struct chi_device_api *api; // function pointers
uint32_t *device_addr;
void *cfg;
} chi_device_t;
4 changes: 3 additions & 1 deletion tests/generic/testReturnZero/src/testReturn0.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
//
// Moritz Scherer <[email protected]>

int main() { return 0; }
int main() {
return 0;
}

0 comments on commit 9d6195e

Please sign in to comment.