RP2040: Enable ExternalNotification and RangeTest Module, set randomSeed (#2664)

* Enable ExternalNotification (and RangeTest) Module

* Set a random seed at boot
This commit is contained in:
GUVWAF
2023-07-29 14:19:58 +02:00
committed by GitHub
parent 3d697f8cf4
commit ffcc1a0275
6 changed files with 19 additions and 4 deletions

View File

@@ -27,4 +27,12 @@ void getMacAddr(uint8_t *dmac)
dmac[2] = src.id[4];
dmac[1] = src.id[3];
dmac[0] = src.id[2];
}
void rp2040Setup()
{
/* Sets a random seed to make sure we get different random numbers on each boot.
Taken from CPU cycle counter and ROSC oscillator, so should be pretty random.
*/
randomSeed(rp2040.hwrand32());
}