Simple USBHost library for Nucleo F446RE/F411RE/F401RE FRDM-KL46Z/KL25Z/F64F LPC4088/LPC1768

Dependencies:   FATFileSystem

Dependents:   F401RE-BTstack_example F401RE-USBHostMSD_HelloWorld

Fork of KL46Z-USBHost by Norimasa Okamoto

Embed: (wiki syntax)

« Back to documentation index

USBDeviceConnected Class Reference

USBDeviceConnected Class Reference

USBDeviceConnected class. More...

#include <USBDeviceConnected.h>

Public Member Functions

 USBDeviceConnected ()
 Constructor.
bool addEndpoint (uint8_t intf_nb, USBEndpoint *ep)
 Attach an USBEndpoint to this device.
USBEndpointgetEndpoint (uint8_t intf_nb, ENDPOINT_TYPE type, ENDPOINT_DIRECTION dir, uint8_t index=0)
 Retrieve an USBEndpoint by its TYPE and DIRECTION.
USBEndpointgetEndpoint (uint8_t intf_nb, uint8_t index)
 Retrieve an USBEndpoint by its index.
bool addInterface (uint8_t intf_nb, uint8_t intf_class, uint8_t intf_subclass, uint8_t intf_protocol)
 Add a new interface to this device.
void disconnect ()
 Disconnect the device by calling a callback function registered by a driver.

Detailed Description

USBDeviceConnected class.

Definition at line 40 of file USBDeviceConnected.h.


Constructor & Destructor Documentation

Constructor.

Definition at line 20 of file USBDeviceConnected.cpp.


Member Function Documentation

bool addEndpoint ( uint8_t  intf_nb,
USBEndpoint ep 
)

Attach an USBEndpoint to this device.

Parameters:
intf_nbinterface number
eppointeur on the USBEndpoint which will be attached
Returns:
true if successful, false otherwise

Definition at line 46 of file USBDeviceConnected.cpp.

bool addInterface ( uint8_t  intf_nb,
uint8_t  intf_class,
uint8_t  intf_subclass,
uint8_t  intf_protocol 
)

Add a new interface to this device.

Parameters:
intf_nbinterface number
intf_classinterface class
intf_subclassinterface subclass
intf_protocolinterface protocol
Returns:
true if successful, false otherwise

Definition at line 37 of file USBDeviceConnected.cpp.

void disconnect (  )

Disconnect the device by calling a callback function registered by a driver.

Definition at line 62 of file USBDeviceConnected.cpp.

USBEndpoint * getEndpoint ( uint8_t  intf_nb,
ENDPOINT_TYPE  type,
ENDPOINT_DIRECTION  dir,
uint8_t  index = 0 
)

Retrieve an USBEndpoint by its TYPE and DIRECTION.

Parameters:
intf_nbthe interface on which to lookup the USBEndpoint
typetype of the USBEndpoint looked for
dirdirection of the USBEndpoint looked for
indexthe index of the USBEndpoint whitin the interface
Returns:
pointer on the USBEndpoint if found, NULL otherwise

Definition at line 70 of file USBDeviceConnected.cpp.

USBEndpoint * getEndpoint ( uint8_t  intf_nb,
uint8_t  index 
)

Retrieve an USBEndpoint by its index.

Parameters:
intf_nbinterface number
indexindex of the USBEndpoint
Returns:
pointer on the USBEndpoint if found, NULL otherwise

Definition at line 86 of file USBDeviceConnected.cpp.