MCUX CLNS
MCUX Crypto Library Normal Secure
 
Loading...
Searching...
No Matches
Buffer initialization functionality

Buffer initialization functionality. More...

Macros

#define MCUXCLBUFFER_INIT(name, info, ptr, size)
 Initialize an input/output buffer (mcuxCl_Buffer_t).
 
#define MCUXCLBUFFER_INIT_RO(name, info, ptr, size)
 Initialize an input buffer (mcuxCl_InputBuffer_t) with plain CPU handling.
 
#define MCUXCLBUFFER_INIT_RW(name, info, ptr, size)
 Initialize an input/output buffer (mcuxCl_Buffer_t) with plain CPU handling.
 
#define MCUXCLBUFFER_INIT_DMA_RO(name, info, ptr, size)
 Initialize an input buffer (mcuxCl_InputBuffer_t) with DMA handling.
 
#define MCUXCLBUFFER_INIT_DMA_RW(name, info, ptr, size)
 Initialize an input/output buffer (mcuxCl_Buffer_t) with DMA handling.
 
#define MCUXCLBUFFER_INIT_DMA(name, info, ptr, size)
 Initialize an input/output buffer (mcuxCl_Buffer_t) with DMA handling.
 
#define MCUXCLBUFFER_INIT_CUSTOM(name, handler, info, spec, ptr, size)
 Initialize an input/output buffer with custom handler.
 
#define MCUXCLBUFFER_INIT_PLAIN_RO_IMPL(_name, _info, _ptr, _size)
 Initialize an input buffer with plain CPU handling.
 
#define MCUXCLBUFFER_INIT_PLAIN_RW_IMPL(_name, _info, _ptr, _size)
 Initialize an input/output buffer with plain CPU handling.
 
#define MCUXCLBUFFER_INIT_DMA_RO_IMPL(_name, _info, _ptr, _size)
 DMA handling is not supported.
 
#define MCUXCLBUFFER_INIT_DMA_RW_IMPL(_name, _info, _ptr, _size)
 DMA handling is not supported.
 
#define MCUXCLBUFFER_INIT_CUSTOM_IMPL(_name, _handler, _info, _spec, _ptr, _size)
 Usage of custom handler is not supported.
 

Detailed Description

Buffer initialization functionality.

Two sets of default buffer initializations are provided, each with read-only (RO, for mcuxCl_InputBuffer_t) and read-write (RW, for mcuxCl_Buffer_t) variants:

Note
The DMA variants will be mapped to plain for buffer implementations that do not support DMA operations.

Additionally a custom initializer is provided as well as some aliases that can be used as shorthand notation.

Macro Definition Documentation

◆ MCUXCLBUFFER_INIT

#define MCUXCLBUFFER_INIT (   name,
  info,
  ptr,
  size 
)

Initialize an input/output buffer (mcuxCl_Buffer_t).

This macro is an alias for MCUXCLBUFFER_INIT_RW.

See also
MCUXCLBUFFER_INIT_RW
Parameters
namethe name to be used for the buffer variable
infopointer to a data structure that holds relevant information for the handler
ptrpointer to the memory location of the buffer
sizesize of the buffer - RFU
Examples
mcuxClEcc_EdDSA_Ed25519_example.c, mcuxClEcc_EdDSA_Ed25519ctx_example.c, mcuxClEcc_EdDSA_Ed25519ph_example.c, mcuxClEcc_EdDSA_GenerateSignature_Ed25519_example.c, mcuxClMacModes_Els_Cmac_Aes128_Oneshot_Example.c, mcuxClRandom_PRNG_Patch_example.c, mcuxClRsa_sign_NoEncode_example.c, mcuxClRsa_sign_pss_sha2_256_example.c, mcuxClRsa_verify_NoVerify_example.c, and mcuxClRsa_verify_pssverify_sha2_256_example.c.

◆ MCUXCLBUFFER_INIT_RO

#define MCUXCLBUFFER_INIT_RO (   name,
  info,
  ptr,
  size 
)

Initialize an input buffer (mcuxCl_InputBuffer_t) with plain CPU handling.

This macro can be used to initialize an input buffer that will be handled using plain CPU operations.

Parameters
namethe name to be used for the buffer variable
infopointer to a data structure that holds relevant information for the handler
ptrpointer to the memory location of the buffer
sizesize of the buffer - RFU
Examples
mcuxClEcc_EdDSA_Ed25519_example.c, mcuxClEcc_EdDSA_Ed25519ctx_example.c, mcuxClEcc_EdDSA_Ed25519ph_example.c, mcuxClEcc_EdDSA_GenerateSignature_Ed25519_example.c, mcuxClEcc_EdDSA_VerifySignature_Ed25519_example.c, mcuxClMacModes_Els_Cmac_Aes128_Oneshot_Example.c, mcuxClRsa_sign_NoEncode_example.c, mcuxClRsa_sign_pss_sha2_256_example.c, and mcuxClRsa_verify_pssverify_sha2_256_example.c.

◆ MCUXCLBUFFER_INIT_RW

#define MCUXCLBUFFER_INIT_RW (   name,
  info,
  ptr,
  size 
)

Initialize an input/output buffer (mcuxCl_Buffer_t) with plain CPU handling.

This macro can be used to initialize an input/output buffer that will be handled using plain CPU operations.

Parameters
namethe name to be used for the buffer variable
infopointer to a data structure that holds relevant information for the handler
ptrpointer to the memory location of the buffer
sizesize of the buffer - RFU

◆ MCUXCLBUFFER_INIT_DMA_RO

#define MCUXCLBUFFER_INIT_DMA_RO (   name,
  info,
  ptr,
  size 
)

Initialize an input buffer (mcuxCl_InputBuffer_t) with DMA handling.

This macro can be used to initialize an input buffer that will be handled using DMA operations.

Note
DMA operations are only supported for object-oriented buffer implementations.
Parameters
namethe name to be used for the buffer variable
infopointer to a data structure that holds relevant information for the handler
ptrpointer to the memory location of the buffer
sizesize of the buffer - RFU

◆ MCUXCLBUFFER_INIT_DMA_RW

#define MCUXCLBUFFER_INIT_DMA_RW (   name,
  info,
  ptr,
  size 
)

Initialize an input/output buffer (mcuxCl_Buffer_t) with DMA handling.

This macro can be used to initialize an input/output buffer that will be handled using DMA operations.

Note
DMA operations are only supported for object-oriented buffer implementations.
Parameters
namethe name to be used for the buffer variable
infopointer to a data structure that holds relevant information for the handler
ptrpointer to the memory location of the buffer
sizesize of the buffer - RFU

◆ MCUXCLBUFFER_INIT_DMA

#define MCUXCLBUFFER_INIT_DMA (   name,
  info,
  ptr,
  size 
)

Initialize an input/output buffer (mcuxCl_Buffer_t) with DMA handling.

This macro is an alias for MCUXCLBUFFER_INIT_RW.

See also
MCUXCLBUFFER_INIT_RW
Parameters
namethe name to be used for the buffer variable
infopointer to a data structure that holds relevant information for the handler
ptrpointer to the memory location of the buffer
sizesize of the buffer - RFU

◆ MCUXCLBUFFER_INIT_CUSTOM

#define MCUXCLBUFFER_INIT_CUSTOM (   name,
  handler,
  info,
  spec,
  ptr,
  size 
)

Initialize an input/output buffer with custom handler.

This macro can be used to initialize an input/output buffer with a custom handler.

Note
Custom handlers are only supported for object-oriented buffer implementations.
Parameters
namethe name to be used for the buffer variable
handlerthe callback function that will handle the buffer operations
infopointer to a data structure that holds relevant information for the handler
specspecification of the buffer properties
ptrpointer to the memory location of the buffer
sizesize of the buffer - RFU

◆ MCUXCLBUFFER_INIT_PLAIN_RO_IMPL

#define MCUXCLBUFFER_INIT_PLAIN_RO_IMPL (   _name,
  _info,
  _ptr,
  _size 
)

Initialize an input buffer with plain CPU handling.

This macro can be used to initialize an input buffer that will be handled using plain CPU operations.

Parameters
_namethe name to be used for the buffer variable
_infounused for the current implementation
_ptrpointer to the memory location of the buffer
_sizeunused for the current implementation

◆ MCUXCLBUFFER_INIT_PLAIN_RW_IMPL

#define MCUXCLBUFFER_INIT_PLAIN_RW_IMPL (   _name,
  _info,
  _ptr,
  _size 
)

Initialize an input/output buffer with plain CPU handling.

This macro can be used to initialize an input/output buffer that will be handled using plain CPU operations.

Parameters
_namethe name to be used for the buffer variable
_infounused for the current implementation
_ptrpointer to the memory location of the buffer
_sizeunused for the current implementation

◆ MCUXCLBUFFER_INIT_DMA_RO_IMPL

#define MCUXCLBUFFER_INIT_DMA_RO_IMPL (   _name,
  _info,
  _ptr,
  _size 
)

DMA handling is not supported.

Initialize an input buffer with plain CPU handling.

This buffer implementation does not support DMA handling, so CPU handling is used as a fallback. This macro is an alias for MCUXCLBUFFER_INIT_PLAIN_RO_IMPL.

Parameters
_namethe name to be used for the buffer variable
_infounused for the current implementation
_ptrpointer to the memory location of the buffer
_sizeunused for the current implementation

◆ MCUXCLBUFFER_INIT_DMA_RW_IMPL

#define MCUXCLBUFFER_INIT_DMA_RW_IMPL (   _name,
  _info,
  _ptr,
  _size 
)

DMA handling is not supported.

Initialize an input/output buffer with plain CPU handling.

This buffer implementation does not support DMA handling, so CPU handling is used as a fallback. This macro is an alias for MCUXCLBUFFER_INIT_PLAIN_RW_IMPL.

Parameters
_namethe name to be used for the buffer variable
_infounused for the current implementation
_ptrpointer to the memory location of the buffer
_sizeunused for the current implementation

◆ MCUXCLBUFFER_INIT_CUSTOM_IMPL

#define MCUXCLBUFFER_INIT_CUSTOM_IMPL (   _name,
  _handler,
  _info,
  _spec,
  _ptr,
  _size 
)

Usage of custom handler is not supported.

Initialize an input/output buffer with plain CPU handling.

This macro is an alias for MCUXCLBUFFER_INIT_PLAIN_RW_IMPL.

Parameters
_namethe name to be used for the buffer variable
_handlerunused for the current implementation
_infounused for the current implementation
_specunused for the current implementation
_ptrpointer to the memory location of the buffer
_sizeunused for the current implementation