mbed TLS v2.2.0
timing_alt.h
Go to the documentation of this file.
1 
21 #ifndef MBEDTLS_TIMING_ALT_H
22 #define MBEDTLS_TIMING_ALT_H
23 
24 #if !defined(MBEDTLS_CONFIG_FILE)
25 #include "config.h"
26 #else
27 #include MBEDTLS_CONFIG_FILE
28 #endif
29 
30 /***************************************************************************/
35 /***************************************************************************/
41 #if defined(MBEDTLS_TIMING_ALT)
42 
43 /* SiliconLabs timing implementation */
44 
45 #include "em_device.h"
46 #include <stdint.h>
47 
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51 
56 void mbedtls_timing_init( void );
57 
62 void mbedtls_timing_free( void );
63 
68 static inline unsigned long mbedtls_timing_hardclock( void )
69 {
70  return( DWT->CYCCNT );
71 }
72 
73 
74 #ifdef __cplusplus
75 }
76 #endif
77 
78 #endif /* MBEDTLS_TIMING_ALT */
79 
83 #endif /* MBEDTLS_TIMING_ALT_H */
unsigned long mbedtls_timing_hardclock(void)
Return the CPU cycle counter value.
Compatibility names (set of defines)