diff --git a/atkbd.pio b/atkbd.pio index f8a4d80..18d3e90 100644 --- a/atkbd.pio +++ b/atkbd.pio @@ -32,7 +32,7 @@ send_byte: send_bit: wait 0 pin 1 - out pins 1 + out pindirs 1 wait 1 pin 1 jmp x-- send_bit diff --git a/keyboard.c b/keyboard.c index b51f24f..5a846a8 100644 --- a/keyboard.c +++ b/keyboard.c @@ -43,7 +43,7 @@ static int parity(int x) { } static void kbd_write_blocking(int value) { value = value | (parity(value) << 8); - pio_sm_put_blocking(kbd_pio, kbd_sm, value); + pio_sm_put_blocking(kbd_pio, kbd_sm, ~value); } static bool expect(int expected, const char *msg) {