mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-18 08:54:15 +01:00
Update to use the delay API to get entropy rather than reading the timer directly.
This commit is contained in:
parent
0df3bb2c37
commit
a89092e275
@ -163,8 +163,8 @@ void TIMER_INT_FUNC(void)
|
||||
// Clear timer interrupt pending bit
|
||||
TIM_ClearITPendingBit(TIMER_INT_TIMER, TIM_IT_Update);
|
||||
|
||||
// random32 = UpdateCRC32(random32, PIOS_DELAY_TIMER->CNT >> 8);
|
||||
// random32 = UpdateCRC32(random32, PIOS_DELAY_TIMER->CNT);
|
||||
// random32 = UpdateCRC32(random32, PIOS_DELAY_GetuS() >> 8);
|
||||
// random32 = UpdateCRC32(random32, PIOS_DELAY_GetuS());
|
||||
|
||||
uptime_ms++;
|
||||
|
||||
@ -785,8 +785,8 @@ int main()
|
||||
|
||||
for (;;)
|
||||
{
|
||||
random32 = updateCRC32(random32, PIOS_DELAY_TIMER->CNT >> 8);
|
||||
random32 = updateCRC32(random32, PIOS_DELAY_TIMER->CNT);
|
||||
random32 = updateCRC32(random32, PIOS_DELAY_GetuS() >> 8);
|
||||
random32 = updateCRC32(random32, PIOS_DELAY_GetuS());
|
||||
|
||||
if (second_tick)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user