From: tmk Date: Sat, 16 Jan 2021 14:31:22 +0000 (+0900) Subject: pc98_usb: Add RDY pulse in response receive #666 X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=d73bedb51acd6c9b145e8b66c9e3207549599bf1;p=max%2Ftmk_keyboard.git pc98_usb: Add RDY pulse in response receive #666 RDY high pulse(>=37us) is required to allow keyboard to send next data. https://archive.org/stream/PC9800TechnicalDataBookHARDWARE1993/PC-9800TechnicalDataBook_HARDWARE1993#page/n157 --- diff --git a/converter/pc98_usb/matrix.c b/converter/pc98_usb/matrix.c index ce5a5b37..17335aa9 100644 --- a/converter/pc98_usb/matrix.c +++ b/converter/pc98_usb/matrix.c @@ -63,6 +63,13 @@ static int16_t pc98_wait_response(void) int16_t code = -1; uint8_t timeout = 255; while (timeout-- && (code = serial_recv2()) == -1) _delay_ms(1); + + // Keyboards require RDY pulse >=37us to send next data + // https://archive.org/stream/PC9800TechnicalDataBookHARDWARE1993/PC-9800TechnicalDataBook_HARDWARE1993#page/n157 + PC98_RDY_PORT |= (1<=37us to send next data + // https://archive.org/stream/PC9800TechnicalDataBookHARDWARE1993/PC-9800TechnicalDataBook_HARDWARE1993#page/n157 + PC98_RDY_PORT |= (1<