Added SPI functions. Need to add to State Machine.