|
|
|
|
|
|
|
|
void setup() |
|
|
void setup() |
|
|
{ |
|
|
{ |
|
|
while (!Serial) ; // wait for Arduino Serial Monitor |
|
|
while (!Serial) ; // wait for Arduino Serial Monitor |
|
|
Serial.println("USB Host Testing"); |
|
|
|
|
|
|
|
|
Serial.println("\n\nUSB Host Testing"); |
|
|
myusb.begin(); |
|
|
myusb.begin(); |
|
|
keyboard1.attachPress(OnPress); |
|
|
keyboard1.attachPress(OnPress); |
|
|
keyboard2.attachPress(OnPress); |
|
|
keyboard2.attachPress(OnPress); |
|
|
|
|
|
|
|
|
Serial.printf("*** Device %s - disconnected ***\n", driver_names[i]); |
|
|
Serial.printf("*** Device %s - disconnected ***\n", driver_names[i]); |
|
|
driver_active[i] = false; |
|
|
driver_active[i] = false; |
|
|
} else { |
|
|
} else { |
|
|
Serial.printf("*** Device %s - connected ***\n", driver_names[i]); |
|
|
|
|
|
|
|
|
Serial.printf("*** Device %s %x:%x - connected ***\n", driver_names[i], drivers[i]->idVendor(), drivers[i]->idProduct()); |
|
|
driver_active[i] = true; |
|
|
driver_active[i] = true; |
|
|
|
|
|
|
|
|
} |
|
|
} |