Skip to content

Commit e16f59a

Browse files
committed
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.
1 parent 17ae051 commit e16f59a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

connectivity/mbedtls/platform/src/timing_mbed.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
#else
2525
#include MBEDTLS_CONFIG_FILE
2626
#endif
27+
28+
#if defined(MBEDTLS_TIMING_ALT)
29+
2730
#include "mbedtls/timing.h"
2831
#include "drivers/Timeout.h"
2932
#include "drivers/Timer.h"
@@ -130,3 +133,5 @@ extern "C" int mbedtls_timing_get_delay(void *data)
130133

131134
return 0;
132135
}
136+
137+
#endif // MBEDTLS_TIMING_ALT

0 commit comments

Comments
 (0)