• Earle F. Philhower, III's avatar
    Only call Wire.onReceive if data is available (#423) · 25b9ca82
    Earle F. Philhower, III authored
    The Pico HW seems to generate an interrupt on the end of every I2C
    write cycle, even if the slave address wasn't actually targeted.
    This would cause the onReceive method to be called with a 0-len
    parameter for every write on the I2C bus.
    
    Now, only call onReceive if there is 1 or more bytes of data available.
    25b9ca82
Wire.cpp 9.48 KB