|
|
@ -4,7 +4,7 @@
|
|
|
|
SPIClass mySPI (&sercom2, 3, 5, 4, SPI_PAD_0_SCK_3, SERCOM_RX_PAD_1); //digital 3,5,4 for PIN_SPI_MISO, PIN_SPI_SCK, PIN_SPI_MOSI
|
|
|
|
SPIClass mySPI (&sercom2, 3, 5, 4, SPI_PAD_0_SCK_3, SERCOM_RX_PAD_1); //digital 3,5,4 for PIN_SPI_MISO, PIN_SPI_SCK, PIN_SPI_MOSI
|
|
|
|
|
|
|
|
|
|
|
|
void setup() {
|
|
|
|
void setup() {
|
|
|
|
Serial.begin(115200);
|
|
|
|
SerialUSB.begin(9600);
|
|
|
|
|
|
|
|
|
|
|
|
// do this first, for Reasons
|
|
|
|
// do this first, for Reasons
|
|
|
|
mySPI.begin();
|
|
|
|
mySPI.begin();
|
|
|
@ -17,8 +17,9 @@ void setup() {
|
|
|
|
|
|
|
|
|
|
|
|
uint8_t i=0;
|
|
|
|
uint8_t i=0;
|
|
|
|
void loop() {
|
|
|
|
void loop() {
|
|
|
|
Serial.println(i);
|
|
|
|
|
|
|
|
mySPI.beginTransaction(SPISettings(8000000, MSBFIRST, SPI_MODE0));
|
|
|
|
mySPI.beginTransaction(SPISettings(8000000, MSBFIRST, SPI_MODE0));
|
|
|
|
int recu = mySPI.transfer(i++);
|
|
|
|
int recu = mySPI.transfer(i++);
|
|
|
|
|
|
|
|
SerialUSB.println(recu);
|
|
|
|
mySPI.endTransaction();
|
|
|
|
mySPI.endTransaction();
|
|
|
|
|
|
|
|
delay(100);
|
|
|
|
}
|
|
|
|
}
|
|
|
|