+ // Kensington Turbo Mouse 5
+ if (len == 8 && buf[0] == 0x4B && buf[1] == 0x4D && buf[2] == 0x4C && buf[3] == 0x31) {
+ xprintf("Turbo Mouse 5\n");
+
+ // Turbo Mouse command sequence to enable four buttons
+ // https://elixir.bootlin.com/linux/v4.4/source/drivers/macintosh/adbhid.c#L1176
+ // https://github.com/NetBSD/src/blob/64b8a48e1288eb3902ed73113d157af50b2ec596/sys/arch/macppc/dev/ams.c#L261
+ static uint8_t cmd1[] = { 0xE7, 0x8C, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x94 };
+ static uint8_t cmd2[] = { 0xA5, 0x14, 0x00, 0x00, 0x69, 0xFF, 0xFF, 0x27 };
+
+ // configure with new address 9
+ adb_host_listen(ADB_ADDR_MOUSE, ADB_REG_3, 0x69, 0xFE);
+ adb_host_flush(9);
+
+ adb_host_flush(ADB_ADDR_MOUSE);
+ adb_host_listen_buf(ADB_ADDR_MOUSE, ADB_REG_2, cmd1, sizeof(cmd1));
+ adb_host_flush(ADB_ADDR_MOUSE);
+ adb_host_listen_buf(ADB_ADDR_MOUSE, ADB_REG_2, cmd2, sizeof(cmd2));
+ }
+
+ // Add device specific init here
+ }
+ mouse_handler = adb_host_talk(ADB_ADDR_MOUSE, ADB_REG_3) & 0xff;
+ mouse_handler = mouse_handler ? mouse_handler : ADB_HANDLER_CLASSIC1_MOUSE;
+ xprintf("handler: %d\n", mouse_handler);
+ #endif
+
+
+ xprintf("\nScan:\n");