Compare commits

..

1 Commits
main ... dev

Author SHA1 Message Date
Matthias@Dell
6384d0ea2e wip: xfer size 2023-12-28 11:22:55 +01:00

View File

@ -95,6 +95,9 @@ void write() {
/* Serial.print(","); */
/* } */
/* Serial.println("."); */
// transfer the size in LE
SPI.transfer(static_cast<uint8_t>(size));
SPI.transfer(static_cast<uint8_t>(size >> 8));
SPI.transfer(buffer, size);
Serial.write(ControlBytes::WRITE);
@ -154,6 +157,14 @@ void loop() {
break;
}
case ControlBytes::WRITE: {
digitalWrite(LEDG, LOW);
digitalWrite(LEDR, HIGH);
read();
digitalWrite(LEDR, LOW);
digitalWrite(LEDG, HIGH);
break;
}
case ControlBytes::READ: {
digitalWrite(LEDG, LOW);
digitalWrite(LEDR, HIGH);
write();