Example #1
0
uint8_t TwoWire::endTransmission(uint8_t fStopBit)
{
    if(fStopBit)
    {
        while(!di2c.stopMaster());
    }
    return(true);
}
Example #2
0
uint8_t TwoWire::requestFrom(uint8_t address, uint8_t quantity)
{
    DTWI::I2C_STATUS status;

    // may have to wait for the last action to finish before
    // a repeated start can occur
    while(!di2c.startMasterRead(address, quantity));

    do
    {
        status = di2c.getStatus();
    } while(status.fMyBus && !status.fNacking);

    while(!di2c.stopMaster());

    return(di2c.available());
}