Skip to content

Commit 3c2a31d

Browse files
TofMassilia13320Grom-
authored andcommitted
[All] Initial commit
0 parents  commit 3c2a31d

238 files changed

Lines changed: 87357 additions & 0 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.

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[Dd]ebug/
2+
[Rr]elease/
3+
[Oo]ut/
4+
[Hh]tml/
5+
.settings/
6+
.vscode/
7+
/.metadata/
8+
__html/
9+
__latex/
10+
__xml/
11+
__out/
12+
__rtf/
13+
__docman
14+
__docbook
15+
*.chm
16+
*.exe
17+
*.bak
18+
*.prefs
19+
*.launch
20+
.settings/
21+
.vscode/
22+
*.xml
23+
/.metadata/
24+
inline_umlgraph_cache_all.pu

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "Middleware/STSELib"]
2+
path = Middleware/STSELib
3+
url = https://github.com/STMicroelectronics/STSELib.git

.pre-commit-config.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/mirrors-clang-format
3+
rev: v20.1.5
4+
hooks:
5+
- id: clang-format
6+
types_or: [c++, c]
7+
args: [-i,'-style={IndentWidth: 4, ColumnLimit: 0, BreakStringLiterals: false, ReflowComments: false}']
8+
exclude: Middleware/|Platform/Core/CMSIS/
9+
10+
- repo: https://github.com/pre-commit/pre-commit-hooks
11+
rev: v5.0.0
12+
hooks:
13+
- id: trailing-whitespace
14+
exclude: Middleware/|Platform/Core/CMSIS/|Documentation
15+
- id: end-of-file-fixer
16+
exclude: Middleware/|Platform/Core/CMSIS/|Documentation
17+
- id: mixed-line-ending
18+
args: [--fix=lf]
19+
exclude: Middleware/|Platform/Core/CMSIS/|Documentation
20+
- id: check-added-large-files
21+
exclude: Middleware/|Platform/Core/CMSIS/|Documentation

Applications/Apps_utils/Apps_utils.c

Lines changed: 573 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
#include "Drivers/delay_ms/delay_ms.h"
2+
#include "Drivers/rng/rng.h"
3+
#include "Drivers/uart/uart.h"
4+
#include "stselib.h"
5+
#include <inttypes.h>
6+
#include <stdio.h>
7+
#include <stdlib.h>
8+
#include <string.h>
9+
10+
#ifndef APPS_UTILS
11+
#define APPS_UTILS
12+
13+
#define PRINT_CLEAR_SCREEN "\x1B[1;1H\x1B[2J"
14+
#define PRINT_BLINK "\x1B[5m"
15+
#define PRINT_UNDERLINE "\x1B[4m"
16+
#define PRINT_BELL "\a"
17+
#define PRINT_BOLD "\x1B[1m"
18+
#define PRINT_ITALIC "\x1B[3m"
19+
#define PRINT_RESET "\x1B[0m"
20+
#ifdef DISABLE_PRINT_COLOR
21+
#define PRINT_BLACK "" /* Black */
22+
#define PRINT_RED "" /* Red */
23+
#define PRINT_GREEN "" /* Green */
24+
#define PRINT_YELLOW "" /* Yellow */
25+
#define PRINT_BLUE "" /* Blue */
26+
#define PRINT_MAGENTA "" /* Magenta */
27+
#define PRINT_CYAN "" /* Cyan */
28+
#define PRINT_WHITE "" /* White */
29+
#else
30+
#define PRINT_BLACK "\x1B[30m" /* Black */
31+
#define PRINT_RED "\x1B[31m" /* Red */
32+
#define PRINT_GREEN "\x1B[32m" /* Green */
33+
#define PRINT_YELLOW "\x1B[33m" /* Yellow */
34+
#define PRINT_BLUE "\x1B[34m" /* Blue */
35+
#define PRINT_MAGENTA "\x1B[35m" /* Magenta */
36+
#define PRINT_CYAN "\x1B[36m" /* Cyan */
37+
#define PRINT_WHITE "\x1B[37m" /* White */
38+
39+
#endif
40+
41+
void apps_terminal_init(uint32_t baudrate);
42+
43+
uint8_t apps_terminal_read_string(char *string, uint8_t *length);
44+
45+
uint8_t apps_terminal_read_unsigned_integer(uint16_t *integer);
46+
47+
void apps_print_data_partition_record_table(stse_Handler_t *pSTSE);
48+
49+
void apps_print_symmetric_key_table_info(stse_Handler_t *pSTSE);
50+
51+
void apps_print_symmetric_key_table_provisioning_control_fields(stse_Handler_t *pSTSE);
52+
53+
void apps_print_asymmetric_key_table_info(stse_Handler_t *pSTSE);
54+
55+
void apps_print_host_key_provisioning_control_fields(stse_Handler_t *pSTSE);
56+
57+
void apps_print_generic_public_key_slot_configuration_flags(stse_Handler_t *pSTSE, PLAT_UI8 slot_number);
58+
59+
void apps_print_hex_buffer(uint8_t *buffer, uint16_t buffer_size);
60+
61+
void apps_print_command_ac_record_table(stse_cmd_authorization_record_t *command_ac_record_table,
62+
uint8_t total_command_count);
63+
64+
void apps_print_life_cycle_state(stsafea_life_cycle_state_t life_cycle_state);
65+
66+
uint32_t apps_generate_random_number(void);
67+
68+
void apps_randomize_buffer(uint8_t *pBuffer, uint16_t buffer_length);
69+
70+
uint8_t apps_compare_buffers(uint8_t *pBuffer1, uint8_t *pBuffer2, uint16_t buffers_length);
71+
72+
void apps_delay_ms(uint16_t ms);
73+
74+
void apps_process_error(uint32_t err);
75+
76+
#endif /*APPS_UTILS*/

0 commit comments

Comments
 (0)