diff --git a/arduino/kbd/kbd.ino b/arduino/kbd/kbd.ino index d031808..e539e58 100644 --- a/arduino/kbd/kbd.ino +++ b/arduino/kbd/kbd.ino @@ -14,13 +14,9 @@ void setup() { pc = ParaComms{ .mosi_cb = - [](uint8_t *data, uint8_t len) { + [](uint8_t* data, uint8_t len) { for (int i = 0; i < len; i++) { Serial.printf("%c", data[i]); - pc.SendByte(data[i]); // echo - if (data[i] == '\r') { - pc.SendByte('\n'); - } } }, }; @@ -32,7 +28,7 @@ void loop() { static int led_counter = 0; static int led = HIGH; - static int mode = 0; // 0 = keyboard, 1 = parallel + static int mode = 0; // 0 = keyboard, 1 = parallel if (led_counter > 400000) { led_counter = 0; @@ -41,7 +37,7 @@ void loop() { } led_counter += 1; - checkKbdReset(); + // checkKbdReset(); uint8_t mosib; if (strobeOccurred(mosib)) { @@ -52,6 +48,9 @@ void loop() { if (Serial.available() > 0) { int c = Serial.read(); +#if 1 + pc.SendByte(c); +#else if (c == 2) { mode = 0; } else if (c == 3) { @@ -63,5 +62,6 @@ void loop() { pc.SendByte(c); } } +#endif } }