i have a USB keyboard & its seems to be working fine at bringing in characters…however at some points in the program I need to query to see if a keyboard is actually present (right now I just blindly assume it is). Is there a way to tell? I do use a connected event which does some things when the keyboard is initially connected, but i’m talikng about much later. I suppose I could just set a flag, but seems like there should be some sort of query available at any point.
I did try GetDevices, but it just returns:
GHIElectronics.NETMF.USBHost.USBH_Device[]
Which doesn’t really show a keyboard is plugged in.
Use a disconnect event as well as a connected event and handle it in your app, or iterate thru enumerated devices and figure out what one you’re interested in and deal with it not being there
Thanks, yeah, I had just realized this was telling me it was providing a list (of length 1, via debug)…so I printed out the only item in the getDevices list:
GHIElectronics.NETMF.USBHost.USBH_Device …not much better!! Seems a bit scarce on descriptive information…
so yes, I’ll just have to keep my own flag or state internally.