I've noticed that the TX and RX lights do "stuff" when the Windows PC is warm booted.
(This would be great to wire up to an alert buzzer!)
I wanted to see what was being sent and received, but so far had no success.
I tried several things, like maybe the PC sends a break command so the USB device doesn't activate just yet?
So I tried SerialUSB.readBreak() , and I've tried writing to the Serial port and checking the buffer length returned by Serial.availableForWrite() it doesn't change even while rebooting the PC which was surprising, and another couple of unsuccessful attempts with Serial.
Something's being transmitted, and received - but I'm wondering now if there's anything I can detect via the Leonardo's software, maybe it's just too low level?
I'm looking into the HID library now, but it's all just a guess without knowing the data being sent/received between the Leo and PC. Is it a Pause? Is it an enumeration? Is it a reset? I've got no idea!
I'd love to learn what's going on, if anyone's got any ideas?