simplified the protocol
takes commands formatted as json from a named-pipe and bit-bangs the given configuration into the muxes and shift registers.
bash$ . ~/stm32/sdk/environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi bash$ $CC muxitd.c -o muxitd
commands are sent as ASCII text terminated by a newline '\n'.
where, m = mux b0000 - ch4 b0001 - ch3 b0010 - ch2 b0011 - ch1
and, i = io each nibble (each 'i') represents an output channel
each bit in the nibble represents an input channel
yes, they're reversed. i didn't check the schematic very carefully after drawing it, apparently.
here's a crappy diagram:
pin cross-reference. shows how everything is connected from a pin on the MPU all the way to a pin on a connector on the main board.
|gpio header pin#||stm32 pin||gpio chip||gpio line#||function|