Add darp5 firmware

This commit is contained in:
Jeremy Soller
2020-01-15 21:02:41 -07:00
parent 9aadf50764
commit 5d10775877
43 changed files with 2472 additions and 201 deletions

View File

@@ -46,25 +46,16 @@ void kbscan_event(void) {
if (i < 8) {
KSOLGOEN = 0;
KSOLGOEN = 1 << i;
GPCRC3 = GPIO_IN;
GPCRC5 = GPIO_IN;
} else if (i < 16) {
KSOLGOEN = 0;
KSOHGOEN = 1 << (i - 8);
GPCRC3 = GPIO_IN;
GPCRC5 = GPIO_IN;
} else if (i == 16) {
KSOLGOEN = 0;
KSOHGOEN = 0;
GPCRC3 = GPIO_OUT;
GPCRC5 = GPIO_IN;
} else if (i == 17) {
KSOLGOEN = 0;
KSOHGOEN = 0;
GPCRC3 = GPIO_IN;
GPCRC5 = GPIO_OUT;
}
GPDRC &= ~((1 << 3) | (1 << 5));
// TODO: figure out optimal delay
delay_ticks(10);
@@ -164,8 +155,6 @@ void kbscan_event(void) {
// Reset all lines to inputs
KSOLGOEN = 0;
KSOHGOEN = 0;
GPCRC3 = GPIO_IN;
GPCRC5 = GPIO_IN;
// TODO: figure out optimal delay
delay_ticks(10);