MCPcopy Create free account
hub / github.com/RobTillaart/Arduino / read16

Method read16

libraries/PCF8575/PCF8575.cpp:73–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71
72
73uint16_t PCF8575::read16()
74{
75 if (_wire->requestFrom(_address, (uint8_t)2) != 2)
76 {
77 _error = PCF8575_I2C_ERROR;
78 return _dataIn; // last value
79 }
80 _dataIn = _wire->read(); // low 8 bits
81 _dataIn |= (_wire->read() << 8); // high 8 bits
82 return _dataIn;
83}
84
85
86uint8_t PCF8575::read(const uint8_t pin)

Callers 1

unittestFunction · 0.45

Calls 1

readMethod · 0.45

Tested by 1

unittestFunction · 0.36