cr100/keyboard.h
Jeff Epler e47e743077 Introduce command keystrokes & add cyclable settings
now if you switch to UART1 and put a jumper or small-value
resistor between GP0 and GP1 you get echo back from typing.

UART2 (pins 12/13) not tested.

Confusingly UART1/2 both use the uart0 peripheral. ssssh.. this is
to keep uart0 as the connection to the DCE and uart1 as the connection
to the future daisy chained device such as a printer or punch.
2024-10-11 11:33:59 -05:00

18 lines
428 B
C

#pragma once
#include "hardware/pio.h"
#include "pico/util/queue.h"
enum {
CMD_SWITCH_PORT = 0xc000,
CMD_SWITCH_RATE,
CMD_SWITCH_SETTINGS,
CMD_REBOOT,
};
extern bool keyboard_setup(PIO pio);
extern void keyboard_poll(queue_t *q);
extern void keyboard_set_leds(int value);
extern void atkbd_program_init(PIO pio, int sm, int offset, int base_pin);
enum { LED_NUM = 4, LED_CAPS = 2 };
extern int keyboard_leds;