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

Method _read

libraries/MSP300/MSP300.cpp:132–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130
131
132void MSP300::_read(uint8_t bytes)
133{
134 if (_wire->requestFrom(_address, bytes) != bytes)
135 {
136 _error = MSP300_ERROR;
137 return; // keep last value
138 }
139 _raw = 0;
140 for (int i= 0; i < bytes; i++)
141 {
142 _raw <<= 8;
143 _raw = _wire->read();
144 }
145}
146
147
148// -- END OF FILE --

Callers

nothing calls this directly

Calls 1

readMethod · 0.45

Tested by

no test coverage detected