8000 Per review by @earlephilhower · dok-net/arduino-esp8266@d3bf7f9 · GitHub
[go: up one dir, main page]

Skip to content

Commit d3bf7f9

Browse files
committed
Per review by @earlephilhower
1 parent 07566e4 commit d3bf7f9

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

cores/esp8266/core_esp8266_i2s.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ static bool _i2s_write_sample(uint32_t sample, bool nb) {
313313
if (tx->slc_queue_len > 0) {
314314
break;
315315
} else {
316-
optimistic_yield(1000);
316+
optimistic_yield(10000);
317317
}
318318
}
319319
}
@@ -362,7 +362,7 @@ static uint16_t _i2s_write_buffer(const int16_t *frames, uint16_t frame_count, b
362362
if (tx->slc_queue_len > 0) {
363363
break;
364364
} else {
365-
optimistic_yield(1000);
365+
optimistic_yield(10000);
366366
}
367367
}
368368
}
@@ -422,7 +422,7 @@ bool i2s_read_sample(int16_t *left, int16_t *right, bool blocking) {
422 10000 422
if (rx->slc_queue_len > 0){
423423
break;
424424
} else {
425-
optimistic_yield(1000);
425+
optimistic_yield(10000);
426426
}
427427
}
428428
}

cores/esp8266/flash_hal.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ extern "C" {
3030
}
3131

3232
int32_t flash_hal_read(uint32_t addr, uint32_t size, uint8_t *dst) {
33-
optimistic_yield(1000);
33+
optimistic_yield(10000);
3434

3535
// We use flashRead overload that handles proper alignment
3636
if (ESP.flashRead(addr, dst, size)) {
@@ -41,7 +41,7 @@ int32_t flash_hal_read(uint32_t addr, uint32_t size, uint8_t *dst) {
4141
}
4242

4343
int32_t flash_hal_write(uint32_t addr, uint32_t size, const uint8_t *src) {
44-
optimistic_yield(1000);
44+
optimistic_yield(10000);
4545

4646
// We use flashWrite overload that handles proper alignment
4747
if (ESP.flashWrite(addr, src, size)) {
@@ -60,7 +60,7 @@ int32_t flash_hal_erase(uint32_t addr, uint32_t size) {
6060
const uint32_t sector = addr / SPI_FLASH_SEC_SIZE;
6161
const uint32_t sectorCount = size / SPI_FLASH_SEC_SIZE;
6262
for (uint32_t i = 0; i < sectorCount; ++i) {
63-
optimistic_yield(1000);
63+
optimistic_yield(10000);
6464
if (!ESP.flashEraseSector(sector + i)) {
6565
DEBUGV("_spif_erase addr=%x size=%d i=%d\r\n", addr, size, i);
6666
return FLASH_HAL_ERASE_ERROR;

cores/esp8266/uart.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ uart_do_write_char(const int uart_nr, char c)
512512
{
513513
while(uart_tx_fifo_full(uart_nr))
514514
{
515-
optimistic_yield(1000UL);
515+
optimistic_yield(10000UL);
516516
}
517517

518518
USF(uart_nr) = c;

libraries/ESP8266WiFi/src/WiFiClient.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ int WiFiClient::available()
251251
int result = _client->getSize();
252252

253253
if (!result) {
254-
optimistic_yield(10000);
254+
optimistic_yield(100);
255255
}
256256
return result;
257257
}

libraries/ESP8266WiFi/src/WiFiUdp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ int WiFiUDP::available() {
117117
if (!result) {
118118
// yielding here will not make more data "available",
119119
// but it will prevent the system from going into WDT reset
120-
optimistic_yield(10000);
120+
optimistic_yield(100UL);
121121
}
122122

123123
return result;
@@ -194,7 +194,7 @@ int WiFiUDP::parsePacket()
194194
return 0;
195195

196196
if (!_ctx->next()) {
197-
optimistic_yield(1000);
197+
optimistic_yield(100UL);
198198
return 0;
199199
}
200200

libraries/Wire/Wire.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ int TwoWire::available(void)
227227
{
228228
// yielding here will not make more data "available",
229229
// but it will prevent the system from going into WDT reset
230-
optimistic_yield(10000UL);
230+
optimistic_yield(100UL);
231231
}
232232

233233
return result;

0 commit comments

Comments
 (0)
0