Small changes to spi flash to work better in rtos