@@ -71,10 +71,8 @@ static void hal_sau_init(void)
7171
7272static void periph_unsecure (void )
7373{
74- #ifndef WOLFSSL_NXP_LPC55S69_NO_HWACCEL
7574 CLOCK_EnableClock (kCLOCK_Rng );
7675 RESET_PeripheralReset (kRNG_RST_SHIFT_RSTn );
77- #endif
7876 CLOCK_EnableClock (kCLOCK_Iocon );
7977 CLOCK_EnableClock (kCLOCK_Gpio1 );
8078}
@@ -113,12 +111,9 @@ void hal_init(void)
113111 uart_write ("lpc55s69 init\n" , 14 );
114112# endif
115113
116- # ifndef WOLFSSL_NXP_LPC55S69_NO_HWACCEL
114+ # ifdef WOLFSSL_NXP_LPC55S69_WITH_HWACCEL
117115 CLOCK_EnableClock (kCLOCK_HashCrypt );
118116 wc_hashcrypt_init ();
119- # endif
120-
121- # ifndef WOLFSSL_NXP_LPC55S69_NO_HWACCEL
122117 CLOCK_EnableClock (kCLOCK_Casper );
123118 wc_casper_init ();
124119# endif
@@ -229,13 +224,11 @@ int RAMFUNCTION hal_flash_erase(uint32_t address, int len)
229224#ifdef WOLFCRYPT_SECURE_MODE
230225void hal_trng_init (void )
231226{
232- #ifndef WOLFSSL_NXP_LPC55S69_NO_HWACCEL
233227# ifdef __WOLFBOOT
234228 CLOCK_EnableClock (kCLOCK_Rng );
235229 RESET_PeripheralReset (kRNG_RST_SHIFT_RSTn );
236230# endif
237231 RNG_Init (RNG );
238- #endif
239232}
240233
241234void hal_trng_fini (void )
@@ -244,10 +237,8 @@ void hal_trng_fini(void)
244237
245238int hal_trng_get_entropy (unsigned char * out , unsigned int len )
246239{
247- #ifndef WOLFSSL_NXP_LPC55S69_NO_HWACCEL
248240 if (RNG_GetRandomData (RNG , out , len ) == kStatus_Success )
249241 return 0 ;
250- #endif
251242
252243 return -1 ;
253244}
0 commit comments