SPI working on new microcontrollers, added second SPI channel

also fixed some compilation bugs