Skip to main content

UsbHostController Class

Package: GHIElectronics.Endpoint.Devices.UsbHost
Namespace: GHIElectronics.Endpoint.Devices.UsbHost

The USB devices plugged into the board, directly or through hubs. One event for each thing a device gives: a keyboard with a touchpad gives Keyboard and Mouse, a webcam gives Webcam and Audio (its microphone). DeviceName is what to open it with (see UsbHost.DeviceType). The events come on the library's USB thread. USB drives come as MassStorage: use StorageController (GHIElectronics.Endpoint.Devices.Storage) for them. A controller stays alive until it is disposed.

class UsbHostController : public IDisposable {};

Methods​

Disable()​

void Disable();

Stops reporting devices. Already-reported devices stay accessible until they are unplugged.

Dispose()​

void Dispose();

Stops the events (one being delivered finishes first)

Enable()​

void Enable();

Starts reporting devices: first the ones already plugged in

GetDefault()​

static UsbHostController GetDefault();

A new USB host controller for the board. Call UsbHostController.Enable to start seeing devices.

Returns UsbHostController

Events​

ConnectionChanged​

Core::Event<...> ConnectionChanged;

A device connected or disconnected