Code: Select all
vSPI.beginTransaction(SPISettings(Motor.GetSpiClk(), MSBFIRST, SPI_MODE0));
SD.begin(SDCARD_CS, vSPI);
Card.AppendFile(TheFile, (char*)dataLine);
SD.end();
vSPI.endTransaction();
Code: Select all
vSPI.beginTransaction(SPISettings(spiClk, MSBFIRST, SPI_MODE3));
digitalWrite(STEPPER_CS, LOW); // enable the powerstep chip select
i = 0; // clear output buffer index
while (count-- > 0)
{
retVal = vSPI.transfer(*ptr); // transfer in/out
}
digitalWrite(STEPPER_CS, HIGH); // disable the chip select
vSPI.endTransaction();
Ron