adb_usb: Initialize keyboard dynamically #671

Extended and ISO keyboard are properly setup even after hot-plug
This commit is contained in:
tmk 2021-11-16 13:26:00 +09:00
parent 0de65d999d
commit d0cddedcdc
3 changed files with 90 additions and 55 deletions

View file

@ -30,6 +30,9 @@
#include "util.h"
// https://gcc.gnu.org/onlinedocs/cpp/Stringizing.html
#define xstr(s) str(s)
#define str(s) #s
#ifndef NO_PRINT

View file

@ -69,8 +69,10 @@ POSSIBILITY OF SUCH DAMAGE.
#define ADB_ADDR_14 14
#define ADB_ADDR_15 15
// for temporary purpose, do not use for polling
#define ADB_ADDR_TMP 15
#define ADB_ADDR_KBD_POLL 9
#define ADB_ADDR_MOUSE_POLL 10
#define ADB_ADDR_KBD_TMP 14
#define ADB_ADDR_MOUSE_TMP 15
// Command Type
#define ADB_CMD_RESET 0
#define ADB_CMD_FLUSH 1