mirror of
https://github.com/raspberrypi/pico-sdk.git
synced 2024-09-29 13:08:48 +08:00
Fix typo in pico_rand breaking randomness when PICO_RAND_ENTROPY_SRC_BUS_PERF_COUNTER=1 (#1246)
This commit is contained in:
parent
79d0eb472d
commit
e763cb8e99
|
@ -272,7 +272,7 @@ uint64_t get_rand_64(void) {
|
||||||
if (bus_counter_value == BUSCTRL_PERFCTR0_BITS) {
|
if (bus_counter_value == BUSCTRL_PERFCTR0_BITS) {
|
||||||
bus_ctrl_hw->counter[bus_counter_idx].value = 0;
|
bus_ctrl_hw->counter[bus_counter_idx].value = 0;
|
||||||
}
|
}
|
||||||
local_rng_state.r[which] &= splitmix64(bus_counter_value);
|
local_rng_state.r[which] ^= splitmix64(bus_counter_value);
|
||||||
which ^= 1;
|
which ^= 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user