Skip to content

Commit b33add0

Browse files
Grolleau-BenjaminGrom-
authored andcommitted
[api/services/core] Code formatting using pre-commit
1 parent fbac82f commit b33add0

121 files changed

Lines changed: 10136 additions & 11691 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clang-format

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
#
3+
# Note: The list of ForEachMacros can be obtained using:
4+
#
5+
# git grep -h '^#define [^[:space:]]*FOR_EACH[^[:space:]]*(' include/ \
6+
# | sed "s,^#define \([^[:space:]]*FOR_EACH[^[:space:]]*\)(.*$, - '\1'," \
7+
# | sort | uniq
8+
#
9+
# References:
10+
# - https://clang.llvm.org/docs/ClangFormatStyleOptions.html
11+
12+
---
13+
BasedOnStyle: LLVM
14+
AlignConsecutiveMacros: AcrossComments
15+
AllowShortBlocksOnASingleLine: Never
16+
AllowShortCaseLabelsOnASingleLine: false
17+
AllowShortEnumsOnASingleLine: false
18+
AllowShortFunctionsOnASingleLine: None
19+
AllowShortIfStatementsOnASingleLine: false
20+
AllowShortLoopsOnASingleLine: false
21+
AttributeMacros:
22+
- __aligned
23+
- __deprecated
24+
- __packed
25+
- __printf_like
26+
- __syscall
27+
- __syscall_always_inline
28+
- __subsystem
29+
BitFieldColonSpacing: After
30+
BreakBeforeBraces: Linux
31+
ColumnLimit: 100
32+
ConstructorInitializerIndentWidth: 8
33+
ContinuationIndentWidth: 8
34+
ForEachMacros:
35+
- 'FOR_EACH'
36+
- 'FOR_EACH_FIXED_ARG'
37+
- 'FOR_EACH_IDX'
38+
- 'FOR_EACH_IDX_FIXED_ARG'
39+
- 'FOR_EACH_NONEMPTY_TERM'
40+
- 'RB_FOR_EACH'
41+
- 'RB_FOR_EACH_CONTAINER'
42+
- 'SYS_DLIST_FOR_EACH_CONTAINER'
43+
- 'SYS_DLIST_FOR_EACH_CONTAINER_SAFE'
44+
- 'SYS_DLIST_FOR_EACH_NODE'
45+
- 'SYS_DLIST_FOR_EACH_NODE_SAFE'
46+
- 'SYS_SFLIST_FOR_EACH_CONTAINER'
47+
- 'SYS_SFLIST_FOR_EACH_CONTAINER_SAFE'
48+
- 'SYS_SFLIST_FOR_EACH_NODE'
49+
- 'SYS_SFLIST_FOR_EACH_NODE_SAFE'
50+
- 'SYS_SLIST_FOR_EACH_CONTAINER'
51+
- 'SYS_SLIST_FOR_EACH_CONTAINER_SAFE'
52+
- 'SYS_SLIST_FOR_EACH_NODE'
53+
- 'SYS_SLIST_FOR_EACH_NODE_SAFE'
54+
- '_WAIT_Q_FOR_EACH'
55+
- 'Z_FOR_EACH'
56+
- 'Z_FOR_EACH_ENGINE'
57+
- 'Z_FOR_EACH_EXEC'
58+
- 'Z_FOR_EACH_FIXED_ARG'
59+
- 'Z_FOR_EACH_FIXED_ARG_EXEC'
60+
- 'Z_FOR_EACH_IDX'
61+
- 'Z_FOR_EACH_IDX_EXEC'
62+
- 'Z_FOR_EACH_IDX_FIXED_ARG'
63+
- 'Z_FOR_EACH_IDX_FIXED_ARG_EXEC'
64+
- 'Z_GENLIST_FOR_EACH_CONTAINER'
65+
- 'Z_GENLIST_FOR_EACH_CONTAINER_SAFE'
66+
- 'Z_GENLIST_FOR_EACH_NODE'
67+
- 'Z_GENLIST_FOR_EACH_NODE_SAFE'
68+
- 'STRUCT_SECTION_FOREACH'
69+
- 'TYPE_SECTION_FOREACH'
70+
- 'K_SPINLOCK'
71+
IfMacros:
72+
- 'CHECKIF'
73+
# Disabled for now, see bug https://github.com/zephyrproject-rtos/zephyr/issues/48520
74+
#IncludeBlocks: Regroup
75+
IncludeCategories:
76+
- Regex: '^".*\.h"$'
77+
Priority: 0
78+
- Regex: '^<(assert|complex|ctype|errno|fenv|float|inttypes|limits|locale|math|setjmp|signal|stdarg|stdbool|stddef|stdint|stdio|stdlib|string|tgmath|time|wchar|wctype)\.h>$'
79+
Priority: 1
80+
- Regex: '^\<zephyr/.*\.h\>$'
81+
Priority: 2
82+
- Regex: '.*'
83+
Priority: 3
84+
IndentCaseLabels: false
85+
IndentWidth: 8
86+
InsertBraces: true
87+
SpaceBeforeParens: ControlStatementsExceptControlMacros
88+
SortIncludes: Never
89+
UseTab: ForContinuationAndIndentation
90+
WhitespaceSensitiveMacros:
91+
- STRINGIFY
92+
- Z_STRINGIFY

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
![STSELib](doc/resources/Pictures/STSELib.png)
44

5-
The STSELib middleware provides a complete set of high-level Application Programming Interface functions to the embedded system developer. This Middleware abstract the build and the sequencing of the commands required to ensure device , accessories and consumable brand protection using STMicroelectronics STSAFE-A secure element family.
5+
The STSELib middleware provides a complete set of high-level Application Programming Interface functions to the embedded system developer. This Middleware abstract the build and the sequencing of the commands required to ensure device , accessories and consumable brand protection using STMicroelectronics STSAFE-A secure element family.
66

7-
This middleware allows a seamless integration of one or multiple STSAFE-A in various host MCU/MPU ecosystem.
7+
This middleware allows a seamless integration of one or multiple STSAFE-A in various host MCU/MPU ecosystem.
88

99
The STSELib middleware is composed of three software modules as illustrated in the figure below. Each layer provides a different level of system abstraction to the embedded system developer.
1010

@@ -14,9 +14,7 @@ The STSELib middleware is composed of three software modules as illustrated in t
1414
This software layer is the entry point for the system application. It provides a set of high level functions allowing interaction with STMicroelectronics Secure Elements.
1515

1616
<b>- Service layer</b>
17-
Provides a set of product services that format all commands supported by the targeted secure element and reports response to higher layers API/Application . This layer can be used directly from Application (for advanced user).
17+
Provides a set of product services that format all commands supported by the targeted secure element and reports response to higher layers API/Application . This layer can be used directly from Application (for advanced user).
1818

1919
<b>- Core layer</b>
2020
Contains generic definition for ST Secure Element and functions for communicating with target secure element.
21-
22-

0 commit comments

Comments
 (0)