24 lines
423 B
C++
24 lines
423 B
C++
#include <SPI.h>
|
|
|
|
void setup() {
|
|
Serial.begin(9600);
|
|
while (!Serial);
|
|
|
|
SPI.begin();
|
|
|
|
pinMode(10, OUTPUT);
|
|
digitalWrite(10, LOW); // Select W5500
|
|
|
|
Serial.println("Testing SPI...");
|
|
|
|
byte response = SPI.transfer(0x00); // Send dummy byte and read response
|
|
|
|
Serial.print("SPI Response: ");
|
|
Serial.println(response, HEX);
|
|
|
|
digitalWrite(10, HIGH); // Deselect W5500
|
|
}
|
|
|
|
void loop() {
|
|
}
|