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

Method read8

libraries/MCP23017_RT/MCP23017.cpp:364–374  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

362
363
364int MCP23017::read8(uint8_t port)
365{
366 if (port > 1)
367 {
368 _error = MCP23017_PORT_ERROR;
369 return MCP23017_INVALID_READ;
370 }
371 _error = MCP23017_OK;
372 if (port == 0) return readReg(MCP23017_GPIO_A);
373 return readReg(MCP23017_GPIO_B); // port == 1
374}
375
376
377// port = 0..1

Callers 1

unittestFunction · 0.45

Calls

no outgoing calls

Tested by 1

unittestFunction · 0.36