MCUX CLNS
MCUX Crypto Library Normal Secure
 
Loading...
Searching...
No Matches
mcuxClCore_Examples.h
1/*--------------------------------------------------------------------------*/
2/* Copyright 2020-2023 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
14#ifndef MCUXCLCORE_EXAMPLES_H_
15#define MCUXCLCORE_EXAMPLES_H_
16
17#include <mcuxClCore_Platform.h>
18#include <mcuxClCore_Macros.h>
20
21
26// TODO CLNS-3599: #define MCUXCLEXAMPLE_FUNCTION(_name) uint32_t _name(void)
27#define MCUXCLEXAMPLE_FUNCTION(_name) \
28MCUX_CSSL_ANALYSIS_START_PATTERN_EXAMPLE_FUNCTION() \
29bool _name(void) \
30MCUX_CSSL_ANALYSIS_STOP_PATTERN_EXAMPLE_FUNCTION()
31
36#define MCUXCLEXAMPLE_STATUS_OK true // TODO CLNS-3599: 0xC001C0DEu
37
43#define MCUXCLEXAMPLE_OK MCUXCLEXAMPLE_STATUS_OK
44
49#define MCUXCLEXAMPLE_STATUS_ERROR false // TODO CLNS-3599: 0xEEEEEEEEu
50
56#define MCUXCLEXAMPLE_ERROR MCUXCLEXAMPLE_STATUS_ERROR
57
58
63#define MCUXCLEXAMPLE_STATUS_FAILURE false // TODO CLNS-3599: 0xFFFFFFFFu
64
70#define MCUXCLEXAMPLE_FAILURE MCUXCLEXAMPLE_STATUS_FAILURE
71
75MCUX_CSSL_FP_FUNCTION_DEF(mcuxClCore_assertEqual)
76static inline bool mcuxClCore_assertEqual(const uint8_t * const x, const uint8_t * const y, uint32_t length)
77{
78 for (uint32_t i = 0; i < length; ++i)
79 {
80 if (x[i] != y[i])
81 {
82 return false;
83 }
84 }
85
86 return true;
87}
88
89#endif /* MCUXCLCORE_EXAMPLES_H_ */
Definition of macros.
Provides the API for the CSSL flow protection mechanism.
#define MCUX_CSSL_FP_FUNCTION_DEF(...)
Definition of a flow protected function.
Definition mcuxCsslFlowProtection.h:159