test SPI
This commit is contained in:
parent
35bdf14074
commit
3d4763e52e
@ -1,9 +0,0 @@
|
||||
void setup() {
|
||||
// put your setup code here, to run once:
|
||||
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// put your main code here, to run repeatedly:
|
||||
|
||||
}
|
19
SPI_M0/SPI_M0_RECEIVE/SPI_M0_RECEIVE.ino
Normal file
19
SPI_M0/SPI_M0_RECEIVE/SPI_M0_RECEIVE.ino
Normal file
@ -0,0 +1,19 @@
|
||||
#include<SPI.h>
|
||||
|
||||
//SPIClass maSPI (&PERIPH_SPI, PIN_SPI_MISO, PIN_SPI_SCK, PIN_SPI_MOSI, PAD_SPI_TX, PAD_SPI_RX);
|
||||
|
||||
|
||||
void setup() {
|
||||
// put your setup code here, to run once:
|
||||
SPI.begin();
|
||||
SerialUSB.begin(9600);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// put your main code here, to run repeatedly:
|
||||
uint16_t data;
|
||||
SerialUSB.println("hello2");
|
||||
delay(1000);
|
||||
data = SPI.transfer(0x00);
|
||||
SerialUSB.println(data);
|
||||
}
|
18
SPI_M0/SPI_M0_SEND/SPI_M0_SEND.ino
Normal file
18
SPI_M0/SPI_M0_SEND/SPI_M0_SEND.ino
Normal file
@ -0,0 +1,18 @@
|
||||
#include<SPI.h>
|
||||
|
||||
//SPIClass maSPI (&PERIPH_SPI, PIN_SPI_MISO, PIN_SPI_SCK, PIN_SPI_MOSI, PAD_SPI_TX, PAD_SPI_RX);
|
||||
|
||||
|
||||
void setup() {
|
||||
// put your setup code here, to run once:
|
||||
SPI.begin();
|
||||
SerialUSB.begin(9600);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// put your main code here, to run repeatedly:
|
||||
SerialUSB.println("hello");
|
||||
delay(1000);
|
||||
SPI.transfer(0x07);
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user