diff options
author | No0ne <[email protected]> | 2023-08-26 00:35:10 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2023-08-26 01:35:10 +0300 |
commit | d4e5722b24cf63bc753da210eb7cd62646563019 (patch) | |
tree | 3caa55f2aaf9c5fd371e8b5a926d2bb785f52e4e /hid/pico/src/ph_ps2_phy.h | |
parent | 1e46110a1259202f30cb94a4d7a814e59a91a38d (diff) |
pico hid: ps/2 fix retransmission (#145)
* pico hid: ps/2 keyboard support getting started (#139)
* pico hid: ps/2 bytes and packets queue
* pico hid: ps/2 bytes and packets queue (#142)
* pico hid: ps/2 fix retransmission
Diffstat (limited to 'hid/pico/src/ph_ps2_phy.h')
-rw-r--r-- | hid/pico/src/ph_ps2_phy.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hid/pico/src/ph_ps2_phy.h b/hid/pico/src/ph_ps2_phy.h index 17dd9e0d..19008c99 100644 --- a/hid/pico/src/ph_ps2_phy.h +++ b/hid/pico/src/ph_ps2_phy.h @@ -4,7 +4,7 @@ #include "hardware/pio.h" #include "pico/util/queue.h" -typedef void (*rx_callback)(u8 byte); +typedef void (*rx_callback)(u8 byte, u8 prev_byte); typedef struct { PIO pio; @@ -13,6 +13,8 @@ typedef struct { queue_t qpacks; u8 sent; rx_callback rx; + u8 last_rx; + u8 last_tx; } ph_ps2_phy; void ph_ps2_phy_init(ph_ps2_phy* this, PIO pio, u8 data_pin, rx_callback rx); |