Ok can someone either help me understand the declaration:
MCP23017 device; uint8_t data;
I tried to find "device" and am probably missing something.
I think its called used during initialization
void mcp23017_init(MCP23017 *obj, uint8_t address) { obj->address = MCP23017_BASE_ADDRESS + address; // set addressing style mcp23017_write_register(obj,MCP23017_IOCON,0x00); obj->data = 0x0000; mcp23017_write_word(obj,MCP23017_IODIRA); // make all output }
I don't understand this method or how its used or works. I don't know what I should be looking for.
any pointers or help would be appreciated.
Nigel