For the ESP8266, timing critical functions like read_bit() should be kept in IRAM by adding
# define CRIT_TIMING IRAM_ATTR for the ESP8266 architecture like this was done for the ESP32.
Without the IRAM_ATTR, I observed that the first call of read_bit() may return a wrong value when the function has to be reloaded into the cache, as this violates the 15us data valid time.
This may be the reason for the sporadic errors observed in #76
For the ESP8266, timing critical functions like read_bit() should be kept in IRAM by adding
# define CRIT_TIMING IRAM_ATTRfor the ESP8266 architecture like this was done for the ESP32.Without the
IRAM_ATTR, I observed that the first call of read_bit() may return a wrong value when the function has to be reloaded into the cache, as this violates the 15us data valid time.This may be the reason for the sporadic errors observed in #76