summaryrefslogtreecommitdiff
path: root/platforms/avr/drivers/ps2/ps2_usart.c
diff options
context:
space:
mode:
authorzvecr <git@zvecr.com>2022-02-25 23:45:40 +0000
committerzvecr <git@zvecr.com>2022-02-25 23:45:40 +0000
commite7931289918221081cbe2a7ea5df27a5d86324db (patch)
tree0b06145520f8aaf5ff5cb928aa5176fc2dd23619 /platforms/avr/drivers/ps2/ps2_usart.c
parentc0ee3d2c79388187883b1b1b1d1a0b6842acf741 (diff)
parentcf31355f08dca311a013168eb3eb995e2fc6a3d1 (diff)
downloadqmk_firmware-e7931289918221081cbe2a7ea5df27a5d86324db.tar.gz
qmk_firmware-e7931289918221081cbe2a7ea5df27a5d86324db.zip
Merge remote-tracking branch 'origin/develop'
Diffstat (limited to 'platforms/avr/drivers/ps2/ps2_usart.c')
-rw-r--r--platforms/avr/drivers/ps2/ps2_usart.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/platforms/avr/drivers/ps2/ps2_usart.c b/platforms/avr/drivers/ps2/ps2_usart.c
index 151cfcd68f..39ec930d4a 100644
--- a/platforms/avr/drivers/ps2/ps2_usart.c
+++ b/platforms/avr/drivers/ps2/ps2_usart.c
@@ -76,7 +76,7 @@ static inline bool pbuf_has_data(void);
static inline void pbuf_clear(void);
void ps2_host_init(void) {
- idle(); // without this many USART errors occur when cable is disconnected
+ idle(); // without this many USART errors occur when cable is disconnected
PS2_USART_INIT();
PS2_USART_RX_INT_ON();
// POR(150-2000ms) plus BAT(300-500ms) may take 2.5sec([3]p.20)
@@ -91,12 +91,12 @@ uint8_t ps2_host_send(uint8_t data) {
/* terminate a transmission if we have */
inhibit();
- _delay_us(100); // [4]p.13
+ _delay_us(100); // [4]p.13
/* 'Request to Send' and Start bit */
data_lo();
clock_hi();
- WAIT(clock_lo, 10000, 10); // 10ms [5]p.50
+ WAIT(clock_lo, 10000, 10); // 10ms [5]p.50
/* Data bit[2-9] */
for (uint8_t i = 0; i < 8; i++) {
@@ -165,7 +165,7 @@ uint8_t ps2_host_recv(void) {
ISR(PS2_USART_RX_VECT) {
// TODO: request RESEND when error occurs?
- uint8_t error = PS2_USART_ERROR; // USART error should be read before data
+ uint8_t error = PS2_USART_ERROR; // USART error should be read before data
uint8_t data = PS2_USART_RX_DATA;
if (!error) {
pbuf_enqueue(data);