changed libsoc_spi_rw to expect uint16_t