mbed TLS v2.2.0
sl_crypto.h
Go to the documentation of this file.
1 
21 #ifndef MBEDTLS_SL_CRYPTO_H
22 #define MBEDTLS_SL_CRYPTO_H
23 
24 #include "em_device.h"
25 
26 #if ( defined(CRYPTO_COUNT) && (CRYPTO_COUNT > 0) ) || \
27  ( defined(AES_COUNT) && (AES_COUNT > 0) )
28 
29 #if !defined(MBEDTLS_CONFIG_FILE)
30 #include "mbedtls/config.h"
31 #else
32 #include MBEDTLS_CONFIG_FILE
33 #endif
34 
35 #if defined( MBEDTLS_SLCL_PLUGINS )
36 
37 #if defined(CRYPTO_COUNT) && (CRYPTO_COUNT > 0)
38 #include "cryptodrv.h"
39 #endif
40 
41 #include "mbedtls_ecode.h"
42 #include <stdbool.h>
43 
46 #if defined(CRYPTO_COUNT) && (CRYPTO_COUNT > 0)
47 #define MBEDTLS_ERR_ABORTED ((int)MBEDTLS_ECODE_CRYPTODRV_OPERATION_ABORTED)
48 #define MBEDTLS_ERR_DEVICE_BUSY ((int)MBEDTLS_ECODE_CRYPTODRV_BUSY)
49 #endif
50 #endif /* #if defined( MBEDTLS_SLCL_PLUGINS ) */
51 
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55 
58 typedef enum
59 {
63 #if defined( MBEDTLS_INCLUDE_IO_MODE_DMA )
64  MBEDTLS_DEVICE_IO_MODE_DMA
66 #endif
68 
69 #if defined( MBEDTLS_INCLUDE_IO_MODE_DMA )
70 
71 typedef struct
72 {
73  unsigned int dma_ch_in;
74  unsigned int dma_ch_out;
75 } mbedtls_device_dma_config;
76 #endif
77 
79 typedef union
80 {
81 #if defined( MBEDTLS_INCLUDE_IO_MODE_DMA )
82  mbedtls_device_dma_config dma_config;
83 #else
84  void* placeholder;
87 #endif
89 
90 #ifdef __cplusplus
91 }
92 #endif
93 
94 #endif /* #if ( defined(CRYPTO_COUNT) && (CRYPTO_COUNT > 0) ) || \
95  ( defined(AES_COUNT) && (AES_COUNT > 0) ) */
96 
97 #endif /* #ifndef MBEDTLS_SL_CRYPTO_H */
Compatibility names (set of defines)
Silicon Labs specific mbedtls error code definitions.
mbedtls_device_io_mode
Enum defines which data I/O mode to use for moving data to/from the AES/CRYPTO hardware module...
Definition: sl_crypto.h:58
Data I/O mode specific configuration structure.
Definition: sl_crypto.h:79