In the original NETMF code we polled the Microsoft.SPOT.Hardware.UsbClient.UsbController.PortState for state Running to detect when a computer was connected to the USB Client interface.
In TinyCLR we dont have that state? (we dont have port state, only device state)
namespace GHIElectronics.TinyCLR.Devices.UsbClient
{
public enum DeviceState
{
Detached = 0,
Attached = 1,
Powered = 2,
Default = 3,
Address = 4,
Configured = 5,
Suspended = 6
}
}
What would be a correct way to detect when a connection is made?