diff --git a/examples/platforms/nrf52840/misc.c b/examples/platforms/nrf52840/misc.c index d3e174d2e..94b30d003 100644 --- a/examples/platforms/nrf52840/misc.c +++ b/examples/platforms/nrf52840/misc.c @@ -33,6 +33,11 @@ static uint32_t sResetReason; +__WEAK void nrf5CryptoInit(void) +{ + // This function is defined as weak so it could be overridden with external implementation. +} + void nrf5MiscInit(void) { // Read the reason of last reset. diff --git a/examples/platforms/nrf52840/platform-nrf5.h b/examples/platforms/nrf52840/platform-nrf5.h index 86fe7e8ec..e57a37340 100644 --- a/examples/platforms/nrf52840/platform-nrf5.h +++ b/examples/platforms/nrf52840/platform-nrf5.h @@ -78,7 +78,7 @@ void nrf5RandomInit(void); void nrf5LogInit(void); /** - * Function for processing SPI Slave driver. + * Initialization of Misc module. * */ void nrf5MiscInit(void); @@ -95,4 +95,10 @@ void nrf5RadioInit(void); */ void nrf5RadioProcess(otInstance *aInstance); +/** + * Initialization of hardware crypto engine. + * + */ +void nrf5CryptoInit(void); + #endif // PLATFORM_NRF5_H_ diff --git a/examples/platforms/nrf52840/platform.c b/examples/platforms/nrf52840/platform.c index 8d9746c12..cb1d6454a 100644 --- a/examples/platforms/nrf52840/platform.c +++ b/examples/platforms/nrf52840/platform.c @@ -53,6 +53,7 @@ void PlatformInit(int argc, char *argv[]) nrf5RandomInit(); nrf5UartInit(); nrf5MiscInit(); + nrf5CryptoInit(); nrf5RadioInit(); #if (OPENTHREAD_ENABLE_DEFAULT_LOGGING == 0) nrf5LogInit();