USBHost library. NOTE: This library is only officially supported on the LPC1768 platform. For more information, please see the handbook page.

Dependencies:   FATFileSystem mbed-rtos

Dependents:   BTstack WallbotWii SD to Flash Data Transfer USBHost-MSD_HelloWorld ... more

Embed: (wiki syntax)

« Back to documentation index

USBHostHub Class Reference

USBHostHub Class Reference

A class to use a USB Hub. More...

#include <USBHostHub.h>

Inherits IUSBEnumerator.

Public Member Functions

 USBHostHub ()
 Constructor.
bool connected ()
 Check if a USB Hub is connected.
bool connect (USBDeviceConnected *dev)
 Try to connect device.
void deviceConnected (USBDeviceConnected *dev)
 Automatically called by USBHost when a device has been enumerated by usb_thread.
void deviceDisconnected (USBDeviceConnected *dev)
 Automatically called by USBHost when a device has been disconnected from this hub.
void portReset (uint8_t port)
 Rest a specific port.
void hubDisconnected ()
 Called by USBhost when a hub has been disconnected.

Detailed Description

A class to use a USB Hub.

Definition at line 34 of file USBHostHub.h.


Constructor & Destructor Documentation

USBHostHub (  )

Constructor.

Definition at line 53 of file USBHostHub.cpp.


Member Function Documentation

bool connect ( USBDeviceConnected dev )

Try to connect device.

Parameters:
devdevice to connect
Returns:
true if connection was successful

Definition at line 85 of file USBHostHub.cpp.

bool connected (  )

Check if a USB Hub is connected.

Returns:
true if a serial device is connected

Definition at line 80 of file USBHostHub.cpp.

void deviceConnected ( USBDeviceConnected dev )

Automatically called by USBHost when a device has been enumerated by usb_thread.

Parameters:
devdevice connected

Definition at line 168 of file USBHostHub.cpp.

void deviceDisconnected ( USBDeviceConnected dev )

Automatically called by USBHost when a device has been disconnected from this hub.

Parameters:
devdevice disconnected

Definition at line 173 of file USBHostHub.cpp.

void hubDisconnected (  )

Called by USBhost when a hub has been disconnected.

Definition at line 178 of file USBHostHub.cpp.

void portReset ( uint8_t  port )

Rest a specific port.

Parameters:
portport number

Definition at line 228 of file USBHostHub.cpp.