which is similar. You could use that as an example on how to do it. I guess they only differ in formula.
if (CPU=="AVR") SPI.setClockDivider(SPI_CLOCK_DIV128);if (CPU=="DUE") SPI.setClockDivider(200);SPI.setDataMode(SPI_MODE3);
if you have some sparetime left maby you could point me in the right way, that will be really helpfull