The cycle count that micros() is using to report timing is a PER Task value. When micros() or delayMicroseconds() is called from different Tasks, the lastCycleCount value may have no relationship to the current Task specific cycleCount. If the current cycleCount is less than the saved lastCycleCount a rollover condition is assumed. This erroneous conditions results in incorrect delays and reported microseconds. This fix creates thread local storage so that each Task will have accurate microsecond reporting and delays. The reported microseconds are not real time, they are microseconds of the current Task execution.
esp_efuse_mac_get_default() only stores into the bottom 6 bytes of it's 8-byte argument, so must initialize this arg to zero to avoid trash on the stack.
* Update mDNS and LEDC
* update toolchain
* Update IDF to 1c3dd23
* Advertise the board variant for Arduino OTA
* Add generic variant definition for mDNS
The existing code did not follow protocol with 10bit addressed devices. Per _Philps/NXP Semiconductors UM10204 I2C-bus specification and user manual Rev. 6 4April2014_ pg.15 3.1.11 10-bit addressing:
~The first seven bits of the first byte are the combination of 1111 0xx of which the last two bits (xx) are the two Most-Significant Bits (MSB) of the 10-bit address; the eighth bit of the first byte is the R/!W! bit the determines the direction of the message~
The i2cWrite() function was returning to the app before the i2c transaction had completed. This caused the next Wire() call to return a I2C_ERROR_BUSY.
Usable for library developers who write code not dependent on Arduino.
Adding 3 lines to the includes will permit their debug messages to be
visible in Arduino IDE or when enabled under IDF
Fix redefines of strXXX, original was using strnXXX with length set to 0x7fffffff. This caused problems with strcpy and strcat. The destination buffer was NULL'd to 0x7fffffff which killed the app.
* Addition of a i2cReset method and timeout handling for the case where the i2c hardware FSM (state machine) gets stuck in a busy state.
* Use newly added i2cReset function within the wire library.
* uartEnd: Unlock mutex before detaching rx and tx
This should solve the device freezing issue when Serial.end() is called
* Unlock UART MUTEX only for detaching Rx and Tx
* Thanks to @me-no-dev for pointing it out that
uart->dev->conf0.val can be inside mutex lock