mirror of https://github.com/ARMmbed/mbed-os.git
Move trng code from target_nrf5 to target_nrf5x
After rebase, the build target NRF52840_DK is using TARGET_NRF5x, instead of TARGET_NRF5. Moved Cryptocell TRNG related code from `targets/TARGET_NORDIC/TARGET_NRF5/` to `targets/TARGET_NORDIC/TARGET_NRF5x/`pull/6794/head
parent
ca844fd47a
commit
39973c8a8e
|
@ -47,13 +47,6 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#if DEVICE_CRYPTOCELL
|
||||
#include "objects_cryptocell.h"
|
||||
#else
|
||||
struct trng_s {
|
||||
uint32_t placeholder;
|
||||
};
|
||||
#endif
|
||||
|
||||
struct serial_s {
|
||||
uint32_t placeholder; // struct is unused by nRF5x API implementation
|
||||
|
@ -92,6 +85,10 @@ struct flash_s {
|
|||
uint32_t placeholder;
|
||||
};
|
||||
|
||||
struct trng_s {
|
||||
uint32_t placeholder;
|
||||
};
|
||||
|
||||
#include "gpio_object.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
#include "hal/trng_api.h"
|
||||
#include "hal/lp_ticker_api.h"
|
||||
|
||||
#if !defined(DEVICE_CRYPTOCELL)
|
||||
#include "nrf_drv_rng.h"
|
||||
|
||||
#define DEFAULT_TIMEOUT_US (1000*1000)
|
||||
|
@ -180,5 +179,4 @@ int trng_get_bytes(trng_t *obj, uint8_t *output, size_t length, size_t *output_l
|
|||
return (*output_length == 0) ? -1 : 0;
|
||||
}
|
||||
|
||||
#endif/* !DEVICE_CRYPTOCELL */
|
||||
#endif
|
||||
|
|
|
@ -54,6 +54,14 @@ extern "C" {
|
|||
|
||||
#include "nrf_uart.h"
|
||||
|
||||
#if DEVICE_CRYPTOCELL
|
||||
#include "objects_cryptocell.h"
|
||||
#else
|
||||
struct trng_s {
|
||||
uint32_t placeholder;
|
||||
};
|
||||
#endif
|
||||
|
||||
struct serial_s {
|
||||
int instance;
|
||||
uint32_t tx;
|
||||
|
@ -134,10 +142,6 @@ struct flash_s {
|
|||
uint32_t placeholder;
|
||||
};
|
||||
|
||||
struct trng_s {
|
||||
uint32_t placeholder;
|
||||
};
|
||||
|
||||
#include "gpio_object.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#if defined(DEVICE_TRNG)
|
||||
|
||||
#if !defined(DEVICE_CRYPTOCELL)
|
||||
#include "hal/trng_api.h"
|
||||
#include "hal/critical_section_api.h"
|
||||
|
||||
|
@ -119,5 +119,5 @@ int trng_get_bytes(trng_t *obj, uint8_t *output, size_t length, size_t *output_l
|
|||
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif/* !DEVICE_CRYPTOCELL */
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue