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.
Fix parenthesis type-o.  Scheme flashback
Add shift_out prototype for clarity before using it in #defines.
Fixed SPI code to use correct clock polarity.  The PIC output bits should transition on the falling edge
of the clock signal since the memory clocks them in on the rising edge.  This is SPI mode (1,1).  However,
to get SPI mode (1,1) on the PIC, apparently you program (CKP,CKE) as (1,0).  The clock now idles high and
is active low.

Memory test now passes, reading in the correct device serial number, family and size.
Fix memory routines (working now).  Data round-trips.  Note that in order to write to memory, the section (or subsection) must have been cleared since the last write.  Also fix atoi.
Typecast to avoid warnings.
Merge remote-tracking branch 'origin/feature-memory-management' into feature-sensor-acquisition

Conflicts:
	mainboard-firmware/src/main.c
	mainboard-firmware/src/modules/memory.c