I have a project with a custom USB device that pumps out a stream of data every 1.125 seconds to a Raspberry Pi running Windows 10 IoT, and occasionally receives an 8-byte command. The USB device and the Raspberry Pi are in a custom enclosure and I've got a nice touchscreen going for basic interactivity.
I was kicking around the idea of having the option of plugging a real PC into the device and having that take over the operation of the USB device. Let's consider the device-to-Pi connection to be permanent, and that I can wire an external USB port to my enclosure that connects to the device. I understand that USB is a point-to-point protocol and I can't just use a y-cable. I am able to modify the USB device at the PCB level.
Is there a way to do this? Ideally, I'd like the device to detect when a PC has plugged in and override the device-to-Pi connection and permit two-way communication with the PC while it's connected.
BOUNS POINTS: Is there a way to still receive the data stream at the Raspberry Pi? This would solve some datalogging issues.
I did find this: http://www.ti.com/lit/ds/symlink/ts5usbc400.pdf. It sounds like it might work (I can use Vbus of the PC to toggle the logic somehow, maybe), just glancing at the datasheet. However, this doesn't solve the problem of the bonus question.
If it helps, the USB device uses an NXP MK66FX1M0VLQ18 microcontroller.