Adaptation of the official mbed USBHost repository to work with the LPC4088 Display Module

Dependents:   DMSupport DMSupport DMSupport DMSupport

Fork of DM_USBHost by EmbeddedArtists AB

Embed: (wiki syntax)

« Back to documentation index

USBHALHost Class Reference

USBHALHost Class Reference

USBHALHost class. More...

#include <USBHALHost.h>

Inherited by USBHost.

Protected Member Functions

 USBHALHost ()
 Constructor init variables and memory where will be stored HCCA, ED and TD.
void init ()
 Initialize host controller.
void resetRootHub ()
 reset the root hub
uint32_t controlHeadED ()
 return the value contained in the control HEAD ED register
uint32_t bulkHeadED ()
 return the value contained in the bulk HEAD ED register
uint32_t interruptHeadED ()
 return the value of the head interrupt ED contained in the HCCA
void updateControlHeadED (uint32_t addr)
 Update the head ED for control transfers.
void updateBulkHeadED (uint32_t addr)
 Update the head ED for bulk transfers.
void updateInterruptHeadED (uint32_t addr)
 Update the head ED for interrupt transfers.
void enableList (ENDPOINT_TYPE type)
 Enable List for the specified endpoint type.
bool disableList (ENDPOINT_TYPE type)
 Disable List for the specified endpoint type.
virtual void deviceConnected (int hub, int port, bool lowSpeed, USBHostHub *hub_parent=NULL)=0
 Virtual method called when a device has been connected.
virtual void deviceDisconnected (int hub, int port, USBHostHub *hub_parent, volatile uint32_t addr)=0
 Virtual method called when a device has been disconnected.
virtual void transferCompleted (volatile uint32_t addr)=0
 Virtual method called when a transfer has been completed.
volatile uint8_t * getED ()
 Find a memory section for a new ED.
volatile uint8_t * getTD ()
 Find a memory section for a new TD.
void freeED (volatile uint8_t *ed)
 Release a previous memory section reserved for an ED.
void freeTD (volatile uint8_t *td)
 Release a previous memory section reserved for an TD.

Detailed Description

USBHALHost class.

Definition at line 47 of file USBHALHost.h.


Constructor & Destructor Documentation

USBHALHost (  ) [protected]

Constructor init variables and memory where will be stored HCCA, ED and TD.

Definition at line 67 of file USBHALHost.cpp.


Member Function Documentation

uint32_t bulkHeadED (  ) [protected]

return the value contained in the bulk HEAD ED register

Returns:
address of the bulk head ED

Definition at line 218 of file USBHALHost.cpp.

uint32_t controlHeadED (  ) [protected]

return the value contained in the control HEAD ED register

Returns:
address of the control Head ED

Definition at line 214 of file USBHALHost.cpp.

virtual void deviceConnected ( int  hub,
int  port,
bool  lowSpeed,
USBHostHub hub_parent = NULL 
) [protected, pure virtual]

Virtual method called when a device has been connected.

Parameters:
hubhub number of the device
portport number of the device
lowSpeed1 if low speed, 0 otherwise
hub_parentreference to the hub where the device is connected (NULL if the hub parent is the root hub)

Implemented in USBHost.

virtual void deviceDisconnected ( int  hub,
int  port,
USBHostHub hub_parent,
volatile uint32_t  addr 
) [protected, pure virtual]

Virtual method called when a device has been disconnected.

Parameters:
hubhub number of the device
portport number of the device
hub_parentreference to the hub where the device is connected (NULL if the hub parent is the root hub)
addrlist of the TDs which have been completed to dequeue freed TDs

Implemented in USBHost.

bool disableList ( ENDPOINT_TYPE  type ) [protected]

Disable List for the specified endpoint type.

Parameters:
typedisable the list of ENDPOINT_TYPE type

Definition at line 259 of file USBHALHost.cpp.

void enableList ( ENDPOINT_TYPE  type ) [protected]

Enable List for the specified endpoint type.

Parameters:
typeenable the list of ENDPOINT_TYPE type

Definition at line 240 of file USBHALHost.cpp.

void freeED ( volatile uint8_t *  ed ) [protected]

Release a previous memory section reserved for an ED.

Parameters:
edaddress of the ED

Definition at line 316 of file USBHALHost.cpp.

void freeTD ( volatile uint8_t *  td ) [protected]

Release a previous memory section reserved for an TD.

Parameters:
tdaddress of the TD

Definition at line 322 of file USBHALHost.cpp.

volatile uint8_t * getED (  ) [protected]

Find a memory section for a new ED.

Returns:
the address of the new ED

Definition at line 292 of file USBHALHost.cpp.

volatile uint8_t * getTD (  ) [protected]

Find a memory section for a new TD.

Returns:
the address of the new TD

Definition at line 303 of file USBHALHost.cpp.

void init (  ) [protected]

Initialize host controller.

Enable USB interrupts. This part is not in the constructor because, this function calls a virtual method if a device is already connected

Definition at line 121 of file USBHALHost.cpp.

uint32_t interruptHeadED (  ) [protected]

return the value of the head interrupt ED contained in the HCCA

Returns:
address of the head interrupt ED contained in the HCCA

Definition at line 222 of file USBHALHost.cpp.

void resetRootHub (  ) [protected]

reset the root hub

Definition at line 329 of file USBHALHost.cpp.

virtual void transferCompleted ( volatile uint32_t  addr ) [protected, pure virtual]

Virtual method called when a transfer has been completed.

Parameters:
addrlist of the TDs which have been completed

Implemented in USBHost.

void updateBulkHeadED ( uint32_t  addr ) [protected]

Update the head ED for bulk transfers.

Definition at line 226 of file USBHALHost.cpp.

void updateControlHeadED ( uint32_t  addr ) [protected]

Update the head ED for control transfers.

Definition at line 231 of file USBHALHost.cpp.

void updateInterruptHeadED ( uint32_t  addr ) [protected]

Update the head ED for interrupt transfers.

Definition at line 235 of file USBHALHost.cpp.