fix compile issue with upgrading nrfx v2 and tinyusb
This commit is contained in:
1 parent
7e86e7d0ea
commit
c039eb6787
3 files changed
+30
-172
No files matched your search
@@ -129,12 +129,12 @@ uint16_t get_rand(void)
|
||||
|
||||
for(int i=0; i<2; i++)
|
||||
{
|
||||
nrf_rng_event_clear(NRF_RNG_EVENT_VALRDY);
|
||||
nrf_rng_task_trigger(NRF_RNG_TASK_START);
|
||||
nrf_rng_event_clear(NRF_RNG, NRF_RNG_EVENT_VALRDY);
|
||||
nrf_rng_task_trigger(NRF_RNG, NRF_RNG_TASK_START);
|
||||
|
||||
while ( !nrf_rng_event_get(NRF_RNG_EVENT_VALRDY) ) yield();
|
||||
while ( !nrf_rng_event_check(NRF_RNG, NRF_RNG_EVENT_VALRDY) ) yield();
|
||||
|
||||
bytes[i] = nrf_rng_random_value_get();
|
||||
bytes[i] = nrf_rng_random_value_get(NRF_RNG);
|
||||
}
|
||||
|
||||
return (bytes[0] << 8) + bytes[1];
|
||||
|
||||
Reference in new issue
Block a user