Skip to content

Commit c5d2c27

Browse files
[services] Add STSAFEA_PRODUCT_COUNT for code harmonization
1 parent 72b0870 commit c5d2c27

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

services/stsafea/stsafea_commands.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
#ifdef STSE_CONF_STSAFE_A_SUPPORT
2525

26-
const PLAT_UI16 stsafea_maximum_command_length[4] = {
26+
const PLAT_UI16 stsafea_maximum_command_length[STSAFEA_PRODUCT_COUNT] = {
2727
STSAFEA_MAXIMUM_CMD_RSP_LENGTH_A100,
2828
STSAFEA_MAXIMUM_CMD_RSP_LENGTH_A110,
2929
STSAFEA_MAXIMUM_CMD_RSP_LENGTH_A120,

services/stsafea/stsafea_commands.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
#define STSAFEA_TRUE 0b1
3939
#define STSAFEA_FALSE 0b0
4040

41+
#define STSAFEA_PRODUCT_COUNT 4U
42+
4143
#define STSAFEA_EXT_HEADER_SIZE 2U
4244
#define STSAFEA_HEADER_SIZE 1U
4345
#define STSAFEA_CMD_EXTENSION_SIZE 1U
@@ -130,7 +132,7 @@ typedef enum stsafea_extended_cmd_code_t {
130132
STSAFEA_EXTENDED_CMD_DECOMPRESS_PUBLIC_KEY /*!< STSAFE-A Decompress command code */
131133
} stsafea_extended_cmd_code_t;
132134

133-
extern const PLAT_UI16 stsafea_maximum_command_length[4];
135+
extern const PLAT_UI16 stsafea_maximum_command_length[STSAFEA_PRODUCT_COUNT];
134136

135137
stse_ReturnCode_t stsafea_get_command_count(stse_Handler_t *pSTSE, PLAT_UI8 *pCommand_count);
136138

services/stsafel/stsafel_commands.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,8 @@
3838
#define STSAFEL_PRODUCT_COUNT 1U
3939
#define STSAFEL_MAX_CMD_COUNT 12U
4040

41-
// #define STSAFEL_EXT_HEADER_SIZE 2U
4241
#define STSAFEL_HEADER_SIZE 1U
43-
// #define STSAFEL_CMD_RSP_LEN_SIZE 2U
4442
#define STSAFEL_COUNTER_VALUE_SIZE 3U
45-
//#define STSAFEL_GENERIC_LENGTH_SIZE 2U
46-
//#define STSAFEL_UID_SIZE 8U
4743
#define STSAFEL_MAXIMUM_CMD_RSP_LENGTH_L010 750U
4844

4945
/*!

0 commit comments

Comments
 (0)