Go to the documentation of this file.
97 uint8_t buf[constBufSize];
137 len = (buf[0] > constBufSize) ? constBufSize : buf[0];
143 goto FailGetDevDescr;
186 goto FailGetDevDescr;
197 goto FailSetDevTblEntry;
201 for(uint8_t i = 0; i < num_of_conf; i++) {
210 goto FailGetConfDescr;
228 goto FailSetConfDescr;
252 #ifdef DEBUG_USB_HOST
258 #ifdef DEBUG_USB_HOST
264 #ifdef DEBUG_USB_HOST
270 #ifdef DEBUG_USB_HOST
277 #ifdef DEBUG_USB_HOST
281 #ifdef DEBUG_USB_HOST
311 Notify(
PSTR(
"\r\n EndpointXtract(): Not adding HID interface because we already have "), 0x80);
313 Notify(
PSTR(
" interfaces and can't hold more. "), 0x80);
332 Notify(
PSTR(
"\r\n EndpointXtract(): Not adding endpoint info because we already have "), 0x80);
334 Notify(
PSTR(
" endpoints and can't hold more. "), 0x80);
347 if(pollInterval < pep->bInterval)
365 for(uint8_t i = 0; i < len; i++)
386 uint16_t read = (uint16_t)
epInfo[index].maxPktSize;
394 USBTRACE3(
"(hidcomposite.h) Poll:", rcode, 0x81);
407 for(uint8_t i = 0; i < read; i++) {
408 D_PrintHex<uint8_t > (buf[i], 0x80);
uint8_t outTransfer(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *data)
HIDReportParser * GetReportParser(uint8_t id)
virtual UsbDevice * GetUsbDevicePtr(uint8_t addr)=0
HIDInterface * FindInterface(uint8_t iface, uint8_t alt, uint8_t proto)
uint8_t bNumConfigurations
uint8_t epIndex[maxEpPerInterface+1]
#define USB_TRANSFER_TYPE_INTERRUPT
uint8_t RegisterDeviceClass(USBDeviceConfig *pdev)
virtual uint8_t AllocAddress(uint8_t parent, bool is_hub=false, uint8_t port=0)=0
#define USB_ERROR_CLASS_INSTANCE_ALREADY_IN_USE
#define USBTRACE3(s, r, l)
#define NotifyFailSetDevTblEntry(...)
static const uint8_t epInterruptInIndex
uint8_t getDevDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *dataptr)
defined(USB_METHODS_INLINE)
HIDReportParser * rptParser
uint16_t GetHidClassDescrLen(uint8_t type, uint8_t num)
#define NotifyFailGetConfDescr(...)
#define MAX_REPORT_PARSERS
uint8_t Init(uint8_t parent, uint8_t port, bool lowspeed)
virtual uint8_t OnInitSuccessful()
uint16_t wDescriptorLength
#define HID_MAX_HID_CLASS_DESCRIPTORS
#define NotifyFailGetDevDescr(...)
HID_CLASS_DESCRIPTOR_LEN_AND_TYPE descrInfo[HID_MAX_HID_CLASS_DESCRIPTORS]
uint8_t getConfDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t conf, uint8_t *dataptr)
static const uint8_t maxHidInterfaces
#define USB_NAK_MAX_POWER
#define bmUSB_TRANSFER_TYPE
#define CP_MASK_COMPARE_CLASS
static const uint8_t totalEndpoints
struct HIDComposite::ReportParser rptParsers[MAX_REPORT_PARSERS]
void ZeroMemory(uint8_t len, uint8_t *buf)
EpInfo epInfo[totalEndpoints]
static const uint16_t constBuffLen
uint8_t inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t *data, uint8_t bInterval=0)
#define USB_ERROR_EPINFO_IS_NULL
static const uint8_t epInterruptOutIndex
virtual void Parse(USBHID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf)=0
#define USB_ERROR_ADDRESS_NOT_FOUND_IN_POOL
void EndpointXtract(uint8_t conf, uint8_t iface, uint8_t alt, uint8_t proto, const USB_ENDPOINT_DESCRIPTOR *ep)
uint8_t setConf(uint8_t addr, uint8_t ep, uint8_t conf_value)
uint8_t SndRpt(uint16_t nbytes, uint8_t *dataptr)
#define USB_ERROR_OUT_OF_ADDRESS_SPACE_IN_POOL
#define NotifyFailSetConfDescr(...)
virtual bool SelectInterface(uint8_t iface, uint8_t proto)=0
virtual void FreeAddress(uint8_t addr)=0
#define USB_DEV_CONFIG_ERROR_DEVICE_NOT_SUPPORTED
uint8_t setAddr(uint8_t oldaddr, uint8_t ep, uint8_t newaddr)
HIDInterface hidInterfaces[maxHidInterfaces]
uint8_t setEpInfoEntry(uint8_t addr, uint8_t epcount, EpInfo *eprecord_ptr)
virtual void ParseHIDData(USBHID *hid, uint8_t ep, bool is_rpt_id, uint8_t len, uint8_t *buf)
uint8_t SetIdle(uint8_t iface, uint8_t reportID, uint8_t duration)
static const uint8_t maxEpPerInterface
AddressPool & GetAddressPool()
bool SetReportParser(uint8_t id, HIDReportParser *prs)