fix to switch between SW and HW SPI