Skip to content

write() does not write bits to wire, llWrite() does #40

@UltraBlackLinux

Description

@UltraBlackLinux

Hi there,
I've just found this library and it's been amazingly easy to use. Although, there's an issue: the write() command does not write anything.

I'm running into the same behavior as #33 and the solution from #36 works for me, as in, replacing write() with llWrite()

The block in green does not appear when using write():

Image

Example:

    auto addr = 0x0B;
    swire.startWait(addr, SoftWire::writeMode);
    auto res = swire.llWrite(0x09); // write(0x09) here does not send any data.
    swire.repeatedStart(addr, SoftWire::readMode);
    if (res == SoftWire::ack) {
        Serial.print("\r\nDevice found at 0x");
        Serial.println(addr, HEX);
        uint8_t data;
        swire.readThenAck(data);
        Serial.print(" Data: ");
        Serial.print(data, HEX);
        Serial.flush();
    }
    swire.stop(false);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions