firmware: octsimtest: mcp23017 initializaiton

* driver should not have hard-coded understanding about I/O directions
* board code should pass the I/O direction to driver
* board code should use the correct I/O directions (A0..7, B0: output)

Change-Id: Id4a8e012a33cee01bb489e612e17920760b9be59
This commit is contained in:
Harald Welte
2021-06-03 13:19:46 +02:00
parent d46f6bae2c
commit dd5794c975
3 changed files with 20 additions and 10 deletions

View File

@@ -18,7 +18,7 @@
#define MCP23017_ADDRESS 0x20
int mcp23017_init(uint8_t slave);
int mcp23017_init(uint8_t slave, uint8_t iodira, uint8_t iodirb);
int mcp23017_test(uint8_t slave);
int mcp23017_toggle(uint8_t slave);
//int mcp23017_write_byte(uint8_t slave, uint8_t addr, uint8_t byte);