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

Method read8

libraries/MCP23S17/MCP23S17.cpp:385–395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

383
384
385int MCP23S17::read8(uint8_t port)
386{
387 if (port > 1)
388 {
389 _error = MCP23S17_PORT_ERROR;
390 return MCP23S17_INVALID_READ;
391 }
392 _error = MCP23S17_OK;
393 if (port == 0) return readReg(MCP23S17_GPIO_A);
394 return readReg(MCP23S17_GPIO_B); // port == 1
395}
396
397
398// port = 0..1

Callers 1

unittestFunction · 0.45

Calls

no outgoing calls

Tested by 1

unittestFunction · 0.36