summaryrefslogtreecommitdiff
path: root/platforms/avr/drivers/ps2/ps2_usart.c
diff options
context:
space:
mode:
authorDrashna Jael're <drashna@live.com>2022-03-25 16:19:22 -0700
committerDrashna Jael're <drashna@live.com>2022-03-25 16:19:22 -0700
commit53ff570bf068e04740f187163774327839dfa68b (patch)
tree5429e069fc593d484b0b479de422b51ac239be83 /platforms/avr/drivers/ps2/ps2_usart.c
parente8171efc7158ba4ebb24827680b19b775d366b1a (diff)
parentefc9c525b19b33c6e09057218ea64f07f45f9555 (diff)
Remerge 0.16.x' into firmware21
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);