This is io23017, an utility and a daemon for MCP23017 i2c-connected GPIO chips. Copyright (c)2015 Kadir A. Mueller (kadir.mueller@theflatnet.de) and distributed under the terms of the GNU General Public License version 2. io23017 lets you easily read and write MCP23017 i2c to GPIO chips. It contains a little utility for writing to and a daemon for reading from these chips. The utility will let you write to the GPIO ports while the daemon reads from one port and executes something with the port's value and timing information. Please note that the daemon currently always needs all eight bits of one port, since it is operating on complete octets. Also note that it's polling the chip just ten times per second by default, which is pretty enough for connecting a button or reading a door contact, but not much more. You can change this in the Makefile (DELAY), if you want to. But if you change that, keep your hardware and ressources in mind. The default just fit's my own needs, which may or may not be close to yours. io23017d reads from port a or b every DELAY microseconds and compares the port inputs between reads, executing /usr/local/libexec/io23017 if there was a change on the GPIO port. It's a very simplicistic approach, not using any interrupt and running completely in userspace, but despite that, still runs without even using 1% of an Atheros AR9132 CPU. And not needing things like an interrupt, much CPU or huge amounts of memory makes it easy to use on platforms like Atheros - based routers. BTW: The TP-Link TL-WR1043ND rev.1 (!) has two unused GPIOs that are wired from the SOC with open ends on the PCB. And two GPIOs are exactly what one needs for opening an I2C-bus. But there's absolutely no reason why you shouldn't use this also with your PC or Raspberry Pi. io23017 should work at least on any linux, as long as there's i2c connectivity. Please note that this stuff is just quickly hacked together and not well tested. Usage: io23017d
Executes "/usr/local/libexec/io23017