diff --git a/tmk_core/protocol/adb.c b/tmk_core/protocol/adb.c index 36005951..e774680d 100644 --- a/tmk_core/protocol/adb.c +++ b/tmk_core/protocol/adb.c @@ -254,6 +254,23 @@ void adb_host_flush(uint8_t addr) sei(); } +void adb_host_reset(void) +{ + cli(); + attention(); + send_byte(ADB_CMD_RESET); + place_bit0(); // Stopbit(0) + _delay_us(200); // Tlt/Stop to Start + sei(); +} + +void adb_host_reset_hard(void) +{ + data_lo(); + _delay_us(3000); + data_hi(); +} + // send state of LEDs void adb_host_kbd_led(uint8_t addr, uint8_t led) { diff --git a/tmk_core/protocol/adb.h b/tmk_core/protocol/adb.h index 5e155cbc..2e4c8f21 100644 --- a/tmk_core/protocol/adb.h +++ b/tmk_core/protocol/adb.h @@ -104,6 +104,8 @@ uint8_t adb_host_talk_buf(uint8_t addr, uint8_t reg, uint8_t *buf, uint8_t len) void adb_host_listen(uint8_t addr, uint8_t reg, uint8_t data_h, uint8_t data_l); void adb_host_listen_buf(uint8_t addr, uint8_t reg, uint8_t *buf, uint8_t len); void adb_host_flush(uint8_t addr); +void adb_host_reset(void); +void adb_host_reset_hard(void); void adb_host_kbd_led(uint8_t addr, uint8_t led); void adb_mouse_task(void); void adb_mouse_init(void);