Mistake on this page?
Report an issue in GitHub or email us
Macros | Enumerations
CryptoCell PAL platform dependant types

Macros

#define SASI_SUCCESS   0UL
 
#define SASI_FAIL   1UL
 
#define SASI_1K_SIZE_IN_BYTES   1024
 
#define SASI_BITS_IN_BYTE   8
 
#define SASI_BITS_IN_32BIT_WORD   32
 
#define SASI_32BIT_WORD_SIZE   (sizeof(uint32_t))
 
#define SASI_OK   SASI_SUCCESS
 
#define SASI_UNUSED_PARAM(prm)   ((void)prm)
 
#define SASI_MAX_UINT32_VAL   (0xFFFFFFFF)
 
#define CRYS_MIN(a, b)   ( ( (a) < (b) ) ? (a) : (b) )
 
#define CRYS_MAX(a, b)   ( ( (a) > (b) ) ? (a) : (b) )
 
#define CALC_FULL_BYTES(numBits)   (((numBits) + (SASI_BITS_IN_BYTE -1))/SASI_BITS_IN_BYTE)
 
#define CALC_FULL_32BIT_WORDS(numBits)   (((numBits) + (SASI_BITS_IN_32BIT_WORD -1))/SASI_BITS_IN_32BIT_WORD)
 
#define CALC_32BIT_WORDS_FROM_BYTES(sizeBytes)   (((sizeBytes) + SASI_32BIT_WORD_SIZE - 1) / SASI_32BIT_WORD_SIZE)
 
#define ROUNDUP_BITS_TO_32BIT_WORD(numBits)   (CALC_FULL_32BIT_WORDS(numBits)*SASI_BITS_IN_32BIT_WORD)
 
#define ROUNDUP_BITS_TO_BYTES(numBits)   (CALC_FULL_BYTES(numBits)*SASI_BITS_IN_BYTE)
 
#define ROUNDUP_BYTES_TO_32BIT_WORD(numBytes)   (SASI_32BIT_WORD_SIZE*(((numBytes)+SASI_32BIT_WORD_SIZE-1)/SASI_32BIT_WORD_SIZE))
 

Enumerations

Detailed Description

Macro Definition Documentation

#define CALC_32BIT_WORDS_FROM_BYTES (   sizeBytes)    (((sizeBytes) + SASI_32BIT_WORD_SIZE - 1) / SASI_32BIT_WORD_SIZE)

Macro that calculates number of full 32bits words from bytes (i.e. 3 bytes are 1 word).

Definition at line 103 of file ssi_pal_types.h.

#define CALC_FULL_32BIT_WORDS (   numBits)    (((numBits) + (SASI_BITS_IN_32BIT_WORD -1))/SASI_BITS_IN_32BIT_WORD)

Macro that calculates number of full 32bits words from bits (i.e. 31 bits are 1 word).

Definition at line 101 of file ssi_pal_types.h.

#define CALC_FULL_BYTES (   numBits)    (((numBits) + (SASI_BITS_IN_BYTE -1))/SASI_BITS_IN_BYTE)

Macro that calculates number of full bytes from bits (i.e. 7 bits are 1 byte).

Definition at line 99 of file ssi_pal_types.h.

#define CRYS_MAX (   a,
 
)    ( ( (a) > (b) ) ? (a) : (b) )

Definition for maximum.

Definition at line 95 of file ssi_pal_types.h.

#define CRYS_MIN (   a,
 
)    ( ( (a) < (b) ) ? (a) : (b) )

Definition for minimum.

Definition at line 87 of file ssi_pal_types.h.

#define ROUNDUP_BITS_TO_32BIT_WORD (   numBits)    (CALC_FULL_32BIT_WORDS(numBits)*SASI_BITS_IN_32BIT_WORD)

Macro that round up bits to 32bits words.

Definition at line 105 of file ssi_pal_types.h.

#define ROUNDUP_BITS_TO_BYTES (   numBits)    (CALC_FULL_BYTES(numBits)*SASI_BITS_IN_BYTE)

Macro that round up bits to bytes.

Definition at line 107 of file ssi_pal_types.h.

#define ROUNDUP_BYTES_TO_32BIT_WORD (   numBytes)    (SASI_32BIT_WORD_SIZE*(((numBytes)+SASI_32BIT_WORD_SIZE-1)/SASI_32BIT_WORD_SIZE))

Macro that round up bytes to 32bits words.

Definition at line 109 of file ssi_pal_types.h.

#define SASI_1K_SIZE_IN_BYTES   1024

Defintion of 1KB in bytes.

Definition at line 63 of file ssi_pal_types.h.

#define SASI_32BIT_WORD_SIZE   (sizeof(uint32_t))

Defintion of number of bytes in a 32bits word.

Definition at line 69 of file ssi_pal_types.h.

#define SASI_BITS_IN_32BIT_WORD   32

Defintion of number of bits in a 32bits word.

Definition at line 67 of file ssi_pal_types.h.

#define SASI_BITS_IN_BYTE   8

Defintion of number of bits in a byte.

Definition at line 65 of file ssi_pal_types.h.

#define SASI_FAIL   1UL

Failure definition.

Definition at line 60 of file ssi_pal_types.h.

#define SASI_MAX_UINT32_VAL   (0xFFFFFFFF)

Maximal uint32 value.

Definition at line 78 of file ssi_pal_types.h.

#define SASI_OK   SASI_SUCCESS

Success (OK) defintion.

Definition at line 72 of file ssi_pal_types.h.

#define SASI_SUCCESS   0UL

Success definition.

Definition at line 58 of file ssi_pal_types.h.

#define SASI_UNUSED_PARAM (   prm)    ((void)prm)

Macro that handles unused parameters in the code (to avoid compilation warnings).

Definition at line 75 of file ssi_pal_types.h.

Enumeration Type Documentation

enum SaSiBool

Boolean definition.

Enumerator
SASI_FALSE 

Boolean false definition.

SASI_TRUE 

Boolean true definition.

Definition at line 50 of file ssi_pal_types.h.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.