The Pedigree Project  0.1
Public Member Functions | Private Attributes | List of all members
FtdiSerialDevice Class Reference
+ Inheritance diagram for FtdiSerialDevice:
+ Collaboration diagram for FtdiSerialDevice:

Public Member Functions

 FtdiSerialDevice (UsbDevice *dev)
 
virtual void initialiseDriver ()
 Implemented by the driver class, initialises driver-specific stuff.
 
virtual void setBase (uintptr_t nBaseAddr)
 
virtual char read ()
 
virtual char readNonBlock ()
 
virtual void write (char c)
 
virtual void getName (String &str)
 
- Public Member Functions inherited from UsbDevice
 UsbDevice (UsbHub *pHub, uint8_t nPort, UsbSpeed speed)
 Default constructor.
 
 UsbDevice (UsbDevice *pDev)
 Copy constructor.
 
virtual ~UsbDevice ()
 Destructor.
 
void initialise (uint8_t nAddress)
 Initialises the device at the given address. More...
 
virtual void getUsbDeviceName (String &str)
 
uint8_t getAddress ()
 Returns the current address of the device.
 
uint8_t getPort ()
 Returns the number of the port on which the device is connected.
 
UsbSpeed getSpeed ()
 Returns the speed at which the device operates.
 
UsbState getUsbState ()
 Returns the current state of the device.
 
DeviceDescriptorgetDescriptor ()
 Returns the device descriptor of the device.
 
ConfigDescriptorgetConfiguration ()
 Returns the configuration in use.
 
InterfacegetInterface ()
 Returns the interface in use.
 
void useConfiguration (uint8_t nConfig)
 Switches to the given configuration.
 
void useInterface (uint8_t nInterface)
 Switches to the given interface.
 
UsbDeviceContainergetContainer () const
 Gets our Device container, for replacing parents on hubs etc.
 
virtual bool hasSubtree () const
 Do we expose our own Device tree?
 
virtual DevicegetDevice ()
 
- Public Member Functions inherited from Serial
void write (const char *c)
 

Private Attributes

Endpointm_pInEndpoint
 
Endpointm_pOutEndpoint
 

Additional Inherited Members

- Public Types inherited from UsbDevice
enum  UsbState {
  Connected = 0, Addressed, HasDescriptors, Configured,
  HasInterface, HasDriver
}
 Possible states for an USB device.
 
- Public Attributes inherited from UsbDevice
struct UsbDevice::Setup PACKED
 
struct UsbDevice::DeviceQualifier PACKED
 
- Protected Member Functions inherited from UsbDevice
ssize_t doSync (Endpoint *pEndpoint, UsbPid pid, uintptr_t pBuffer, size_t nBytes, size_t timeout)
 
ssize_t syncIn (Endpoint *pEndpoint, uintptr_t pBuffer, size_t nBytes, size_t timeout=5000)
 
ssize_t syncOut (Endpoint *pEndpoint, uintptr_t pBuffer, size_t nBytes, size_t timeout=5000)
 
void addInterruptInHandler (Endpoint *pEndpoint, uintptr_t pBuffer, uint16_t nBytes, void(*pCallback)(uintptr_t, ssize_t), uintptr_t pParam=0)
 
bool controlRequest (uint8_t nRequestType, uint8_t nRequest, uint16_t nValue, uint16_t nIndex, uint16_t nLength=0, uintptr_t pBuffer=0)
 Performs an USB control request.
 
uint16_t getStatus ()
 Gets device's current status.
 
bool clearEndpointHalt (Endpoint *pEndpoint)
 Clears a halt on the given endpoint.
 
void * getDescriptor (uint8_t nDescriptorType, uint8_t nDescriptorIndex, uint16_t nBytes, uint8_t requestType=0)
 Gets a descriptor from the device. More...
 
uint8_t getDescriptorLength (uint8_t nDescriptorType, uint8_t nDescriptorIndex, uint8_t requestType=0)
 Gets a descriptor's length from the device. More...
 
String getString (uint8_t nString)
 Gets a string. More...
 
- Protected Attributes inherited from UsbDevice
uint8_t m_nAddress
 The current address of the device.
 
uint8_t m_nPort
 The number of the port on which the device is connected.
 
UsbSpeed m_Speed
 The speed at which the device operates.
 
UsbState m_UsbState
 The current state of the device.
 
DeviceDescriptorm_pDescriptor
 Device descriptor for this device.
 
ConfigDescriptorm_pConfiguration
 Configuration in use.
 
Interfacem_pInterface
 Interface in use.
 
UsbHubm_pHub
 Parent USB hub.
 
UsbDeviceContainerm_pContainer
 Our current container.
 

Detailed Description

Definition at line 28 of file FtdiSerialDevice.h.

Member Function Documentation

virtual void FtdiSerialDevice::setBase ( uintptr_t  nBaseAddr)
inlinevirtual
Todo:
make this generic for Mmaped and port IO.

Implements Serial.

Definition at line 36 of file FtdiSerialDevice.h.


The documentation for this class was generated from the following files: