timing_mbed.cpp: Check MBEDTLS_TIMING_ALT

Do not compile the Mbed implementation of Mbed TLS unless
MBEDTLS_TIMING_ALT is defined. This prevents a macro check error on
devices that do not have LPTICKER or USTICKER when Mbed TLS timing
is not enabled.
pull/14772/head
Lingkai Dong 2021-06-14 14:06:35 +01:00
parent 17ae051075
commit e16f59a2ee
1 changed files with 5 additions and 0 deletions

View File

@ -24,6 +24,9 @@
#else #else
#include MBEDTLS_CONFIG_FILE #include MBEDTLS_CONFIG_FILE
#endif #endif
#if defined(MBEDTLS_TIMING_ALT)
#include "mbedtls/timing.h" #include "mbedtls/timing.h"
#include "drivers/Timeout.h" #include "drivers/Timeout.h"
#include "drivers/Timer.h" #include "drivers/Timer.h"
@ -130,3 +133,5 @@ extern "C" int mbedtls_timing_get_delay(void *data)
return 0; return 0;
} }
#endif // MBEDTLS_TIMING_ALT