MCUX CLNS
MCUX Crypto Library Normal Secure
Loading...
Searching...
No Matches
mcuxClCore_Examples.h
1/*--------------------------------------------------------------------------*/
2/* Copyright 2020-2023 NXP */
3/* */
4/* NXP Confidential and Proprietary. This software is owned or controlled */
5/* by NXP and may only be used strictly in accordance with the applicable */
6/* license terms. By expressly accepting such terms or by downloading, */
7/* installing, activating and/or otherwise using the software, you are */
8/* agreeing that you have read, and that you agree to comply with and are */
9/* bound by, such license terms. If you do not agree to be bound by the */
10/* applicable license terms, then you may not retain, install, activate or */
11/* otherwise use the 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
21typedef void (*Interrupt_Callback_t)(void);
22void IsrInterface_HandlerInstall(Interrupt_Callback_t callback,uint8_t Interrupt_number);
23void IsrInterface_Enable(uint32_t IRQ_Number);
24void IsrInterface_Disable(uint32_t IRQ_Number);
25
30// TODO CLNS-3599: #define MCUXCLEXAMPLE_FUNCTION(_name) uint32_t _name(void)
31#define MCUXCLEXAMPLE_FUNCTION(_name) \
32MCUX_CSSL_ANALYSIS_START_PATTERN_EXAMPLE_FUNCTION() \
33bool _name(void); \
34bool _name(void) \
35MCUX_CSSL_ANALYSIS_STOP_PATTERN_EXAMPLE_FUNCTION()
36
41#define MCUXCLEXAMPLE_STATUS_OK true // TODO CLNS-3599: 0xC001C0DEu
42
48#define MCUXCLEXAMPLE_OK MCUXCLEXAMPLE_STATUS_OK
49
54#define MCUXCLEXAMPLE_STATUS_ERROR false // TODO CLNS-3599: 0xEEEEEEEEu
55
61#define MCUXCLEXAMPLE_ERROR MCUXCLEXAMPLE_STATUS_ERROR
62
63
68#define MCUXCLEXAMPLE_STATUS_FAILURE false // TODO CLNS-3599: 0xFFFFFFFFu
69
75#define MCUXCLEXAMPLE_FAILURE MCUXCLEXAMPLE_STATUS_FAILURE
76
80MCUX_CSSL_FP_FUNCTION_DEF(mcuxClCore_assertEqual)
81static inline bool mcuxClCore_assertEqual(const uint8_t * const x, const uint8_t * const y, uint32_t length)
82{
83 for (uint32_t i = 0; i < length; ++i)
84 {
85 if (x[i] != y[i])
86 {
87 return false;
88 }
89 }
90
91 return true;
92}
93
94#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:200