Added generic SPI protocol handler with read and write support.