also, mcp23018_init() needs fixing: `twi_stop()` needs to be at the end
of transmission blocks. i wouldn't think that would be necessary, but
it seems to be the only thing that'll make it work, and it also seems
consistent with the protocol diagram in the datasheet (lol, imagine
that), so i think that's what i'll have to do. not as though it matters
much i guess, since it's a single master / single slave system anyway, i
was just hoping not to release the bus till i was finished..
also, i didn't make a note of it in the *.md file, but Waveform
Generation Mode 15 for fast PWM wasn't working right (well.. wasn't
working how i expected it to). i misinterpreted what the modes were
doing, partially (haha, or all-ly?) because i didn't read the
description of fast pwm thoroughly enough... in any case, all the
information's in the datasheet, and it's actually not terribly long.
i'm not sure how to correctly use Mode 15 yet, but i think i'll leave it
alone for now, since Mode 5 works as expected, and i think what the
datasheet says about *that* makes enough sense to me for me to be
content for the moment.
- removed the comment about the RESET pin on the MCP23018: i think these
chips reset on powerup
- the partitioning of code into files is all wrong at the moment... i
need to write some more and then fix that