USB Host Shield 2.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
HID Class Reference

#include <hid.h>

Inheritance diagram for HID:
Inheritance graph
[legend]
Collaboration diagram for HID:
Collaboration graph
[legend]

Public Member Functions

 HID (USB *pusb)
 
const USBGetUsb ()
 
virtual bool SetReportParser (uint8_t id, HIDReportParser *prs)
 
uint8_t SetProtocol (uint8_t iface, uint8_t protocol)
 
uint8_t GetProtocol (uint8_t iface, uint8_t *dataptr)
 
uint8_t GetIdle (uint8_t iface, uint8_t reportID, uint8_t *dataptr)
 
uint8_t SetIdle (uint8_t iface, uint8_t reportID, uint8_t duration)
 
uint8_t GetReportDescr (uint16_t wIndex, USBReadParser *parser=NULL)
 
uint8_t GetHidDescr (uint8_t ep, uint16_t nbytes, uint8_t *dataptr)
 
uint8_t GetReport (uint8_t ep, uint8_t iface, uint8_t report_type, uint8_t report_id, uint16_t nbytes, uint8_t *dataptr)
 
uint8_t SetReport (uint8_t ep, uint8_t iface, uint8_t report_type, uint8_t report_id, uint16_t nbytes, uint8_t *dataptr)
 
- Public Member Functions inherited from USBDeviceConfig
virtual uint8_t Init (uint8_t parent, uint8_t port, bool lowspeed)
 
virtual uint8_t ConfigureDevice (uint8_t parent, uint8_t port, bool lowspeed)
 
virtual uint8_t Release ()
 
virtual uint8_t Poll ()
 
virtual uint8_t GetAddress ()
 
virtual void ResetHubPort (uint8_t port)
 
virtual boolean VIDPIDOK (uint16_t vid, uint16_t pid)
 
virtual boolean DEVCLASSOK (uint8_t klass)
 
- Public Member Functions inherited from UsbConfigXtracter
virtual void EndpointXtract (uint8_t conf, uint8_t iface, uint8_t alt, uint8_t proto, const USB_ENDPOINT_DESCRIPTOR *ep)=0
 

Protected Member Functions

void PrintEndpointDescriptor (const USB_ENDPOINT_DESCRIPTOR *ep_ptr)
 
void PrintHidDescriptor (const USB_HID_DESCRIPTOR *pDesc)
 
virtual HIDReportParserGetReportParser (uint8_t id)
 

Protected Attributes

USBpUsb
 
uint8_t bAddress
 

Static Protected Attributes

static const uint8_t epInterruptInIndex = 1
 
static const uint8_t epInterruptOutIndex = 2
 
static const uint8_t maxHidInterfaces = 3
 
static const uint8_t maxEpPerInterface = 2
 
static const uint8_t totalEndpoints = (maxHidInterfaces * maxEpPerInterface + 1)
 

Detailed Description

Definition at line 143 of file hid.h.

Constructor & Destructor Documentation

HID::HID ( USB pusb)
inline

Definition at line 163 of file hid.h.

Member Function Documentation

void HID::PrintEndpointDescriptor ( const USB_ENDPOINT_DESCRIPTOR ep_ptr)
protected

Definition at line 57 of file hid.cpp.

void HID::PrintHidDescriptor ( const USB_HID_DESCRIPTOR pDesc)
protected

Definition at line 73 of file hid.cpp.

virtual HIDReportParser* HID::GetReportParser ( uint8_t  id)
protectedvirtual

Reimplemented in HIDUniversal.

const USB* HID::GetUsb ( )
inline

Definition at line 166 of file hid.h.

virtual bool HID::SetReportParser ( uint8_t  id,
HIDReportParser prs 
)
virtual

Reimplemented in HIDBoot< BOOT_PROTOCOL >, and HIDUniversal.

uint8_t HID::SetProtocol ( uint8_t  iface,
uint8_t  protocol 
)

Definition at line 49 of file hid.cpp.

uint8_t HID::GetProtocol ( uint8_t  iface,
uint8_t *  dataptr 
)

Definition at line 53 of file hid.cpp.

uint8_t HID::GetIdle ( uint8_t  iface,
uint8_t  reportID,
uint8_t *  dataptr 
)

Definition at line 41 of file hid.cpp.

uint8_t HID::SetIdle ( uint8_t  iface,
uint8_t  reportID,
uint8_t  duration 
)

Definition at line 45 of file hid.cpp.

uint8_t HID::GetReportDescr ( uint16_t  wIndex,
USBReadParser parser = NULL 
)

Definition at line 17 of file hid.cpp.

uint8_t HID::GetHidDescr ( uint8_t  ep,
uint16_t  nbytes,
uint8_t *  dataptr 
)
uint8_t HID::GetReport ( uint8_t  ep,
uint8_t  iface,
uint8_t  report_type,
uint8_t  report_id,
uint16_t  nbytes,
uint8_t *  dataptr 
)

Definition at line 37 of file hid.cpp.

uint8_t HID::SetReport ( uint8_t  ep,
uint8_t  iface,
uint8_t  report_type,
uint8_t  report_id,
uint16_t  nbytes,
uint8_t *  dataptr 
)

Definition at line 33 of file hid.cpp.

Member Data Documentation

USB* HID::pUsb
protected

Definition at line 145 of file hid.h.

uint8_t HID::bAddress
protected

Definition at line 146 of file hid.h.

const uint8_t HID::epInterruptInIndex = 1
staticprotected

Definition at line 149 of file hid.h.

const uint8_t HID::epInterruptOutIndex = 2
staticprotected

Definition at line 150 of file hid.h.

const uint8_t HID::maxHidInterfaces = 3
staticprotected

Definition at line 152 of file hid.h.

const uint8_t HID::maxEpPerInterface = 2
staticprotected

Definition at line 153 of file hid.h.

const uint8_t HID::totalEndpoints = (maxHidInterfaces * maxEpPerInterface + 1)
staticprotected

Definition at line 154 of file hid.h.


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