ESP8266: Fix example compilation error (#932)

This commit is contained in:
Olivier
2017-09-19 22:48:54 +02:00
committed by Patrick Fallberg
parent f5dce5b61b
commit 5164af7edc
16 changed files with 54 additions and 57 deletions
@@ -432,8 +432,8 @@ static const uint8_t reset_buffer[32] = {
void setup()
{
// Delay startup a bit for serial consoles to catch up
unsigned long enter = hwMillis();
while (hwMillis() - enter < (unsigned long)500);
uint32_t enter = hwMillis();
while (hwMillis() - enter < (uint32_t)500);
#ifdef USE_SOFT_SIGNING
// initialize pseudo-RNG
hwRandomNumberInit();
@@ -530,8 +530,8 @@ static bool generate_random_data(uint8_t* data, size_t sz)
#if defined(USE_SOFT_SIGNING) && ! defined(MY_HW_HAS_GETENTROPY)
for (size_t i = 0; i < sz; i++) {
data[i] = random(256) ^ micros();
unsigned long enter = hwMillis();
while (hwMillis() - enter < (unsigned long)2);
uint32_t enter = hwMillis();
while (hwMillis() - enter < (uint32_t)2);
}
return true;
#elif defined(USE_SOFT_SIGNING) && defined(MY_HW_HAS_GETENTROPY)