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

USBEndpoint Class Reference

USBEndpoint Class Reference

USBEndpoint class. More...

#include <USBEndpoint.h>

Public Member Functions

 USBEndpoint ()
 Constructor.
void init (HCED *hced, ENDPOINT_TYPE type, ENDPOINT_DIRECTION dir, uint32_t size, uint8_t ep_number, HCTD *td_list[2])
 Initialize an endpoint.
void setNextToken (uint32_t token)
 Set next token.
void queueEndpoint (USBEndpoint *endpoint)
 Queue an endpoint.
void queueTransfer ()
 Queue a transfer on the endpoint.
void unqueueTransfer (volatile HCTD *td)
 Unqueue a transfer from the endpoint.
template<typename T >
void attach (T *tptr, void(T::*mptr)(void))
 Attach a member function to call when a transfer is finished.
void attach (void(*fptr)(void))
 Attach a callback called when a transfer is finished.
void call ()
 Call the handler associted to the end of a transfer.

Detailed Description

USBEndpoint class.

Definition at line 29 of file USBEndpoint.h.


Constructor & Destructor Documentation

USBEndpoint (  )

Constructor.

Definition at line 35 of file USBEndpoint.h.


Member Function Documentation

void attach ( T *  tptr,
void(T::*)(void)  mptr 
)

Attach a member function to call when a transfer is finished.

Parameters:
tptrpointer to the object to call the member function on
mptrpointer to the member function to be called

Definition at line 86 of file USBEndpoint.h.

void attach ( void(*)(void)  fptr )

Attach a callback called when a transfer is finished.

Parameters:
fptrfunction pointer

Definition at line 97 of file USBEndpoint.h.

void call (  )

Call the handler associted to the end of a transfer.

Definition at line 106 of file USBEndpoint.h.

void init ( HCED *  hced,
ENDPOINT_TYPE  type,
ENDPOINT_DIRECTION  dir,
uint32_t  size,
uint8_t  ep_number,
HCTD *  td_list[2] 
)

Initialize an endpoint.

Parameters:
hcedhced associated to the endpoint
typeendpoint type
direndpoint direction
sizeendpoint size
ep_numberendpoint number
td_listarray of two allocated transfer descriptors

Definition at line 21 of file USBEndpoint.cpp.

void queueEndpoint ( USBEndpoint endpoint )

Queue an endpoint.

Parameters:
endpointendpoint which will be queued in the linked list

Definition at line 158 of file USBEndpoint.cpp.

void queueTransfer (  )

Queue a transfer on the endpoint.

Definition at line 135 of file USBEndpoint.cpp.

void setNextToken ( uint32_t  token )

Set next token.

Warning: only useful for the control endpoint

Parameters:
tokenIN, OUT or SETUP token

Definition at line 81 of file USBEndpoint.cpp.

void unqueueTransfer ( volatile HCTD *  td )

Unqueue a transfer from the endpoint.

Parameters:
tdhctd which will be unqueued

Definition at line 147 of file USBEndpoint.cpp.