HOTFIX: correct some logic errors with SPI chipselect generation.
Tested by Tridge.