MCUX CLNS
MCUX Crypto Library Normal Secure
mcuxClPkc_Types.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------*/
2 /* Copyright 2020-2021 NXP */
3 /* */
4 /* NXP Confidential. This software is owned or controlled by NXP and may */
5 /* only be used strictly in accordance with the applicable license terms. */
6 /* By expressly accepting such terms or by downloading, installing, */
7 /* activating and/or otherwise using the software, you are agreeing that */
8 /* you have read, and that you agree to comply with and are bound by, such */
9 /* license terms. If you do not agree to be bound by the applicable license */
10 /* terms, then you may not retain, install, activate or otherwise use the */
11 /* software. */
12 /*--------------------------------------------------------------------------*/
13 
20 #ifndef MCUXCLPKC_TYPES_H
21 #define MCUXCLPKC_TYPES_H
22 
23 
24 #include <stdint.h>
25 #include <platform_specific_headers.h>
26 
27 
36 /**********************************************
37  * CONSTANTS
38  **********************************************/
39 /* None */
40 
41 
42 /**********************************************
43  * TYPEDEFS
44  **********************************************/
53 typedef uint32_t mcuxClPkc_Status_t;
54 
59 
60 #define MCUXCLPKC_STATUS_OK ((mcuxClPkc_Status_t) 0xF0F0F0F0U)
61 #define MCUXCLPKC_STATUS_NOK ((mcuxClPkc_Status_t) 0xF0F00F0FU)
62  /* MCUXCLPKC_STATUS_ */
65 
66 
67 /**********************************************************/
68 /* Helper macros */
69 /**********************************************************/
76 #define MCUXCLPKC_ROUNDUP_SIZE(byteLen) \
77  (((uint32_t) (byteLen) + MCUXCLPKC_WORDSIZE - 1u) & (~((uint32_t) MCUXCLPKC_WORDSIZE - 1u)))
78 
80 #define MCUXCLPKC_PACKARGS4(byte3_MSByte, byte2, byte1, byte0_LSByte) \
81  ( ((uint32_t) (byte3_MSByte) << 24) | ((uint32_t) (byte2) << 16) \
82  | ((uint32_t) (byte1) << 8) | ((uint32_t) (byte0_LSByte)) )
83 
85 #define MCUXCLPKC_PACKARGS2(hi8, lo8) \
86  ( ((uint16_t) (hi8) << 8) | ((uint16_t) (lo8)) )
87 
88 
89 /**********************************************************/
90 /* PKC information */
91 /**********************************************************/
92 #define MCUXCLPKC_RAM_START_ADDRESS PKC_RAM_ADDR
93 #define MCUXCLPKC_WORDSIZE 8u
94 
95  /* MCUXCLPKC_MISC_ */
99  /* mcuxClEcc_Macros */
103 
104 #endif /* #MCUXCLPKC_TYPES_H */
uint32_t mcuxClPkc_Status_t
Type for error codes used by PKC component functions.
Definition: mcuxClPkc_Types.h:53
uint64_t mcuxClPkc_Status_Protected_t
Type for error codes used by code-flow protected PKC component functions.
Definition: mcuxClPkc_Types.h:58