Make mem_write take a read-only buffer as input.
Factor out the shift implementation, since it's shared between shift_in and shift_out.  Technically you can read and overwrite at the same time...
Add a memory self-test routine and call it on device reset (in configure_SPI).  Better byte pretty-printing.
Some minor clean-up of memory code.
Remove unnecessary memory.c comments.
fix implementation of shift_n_bytes.