[HID] Removed static fields in HID class
There is still the epType[] array to be handled in some way.
This commit is contained in:
parent
27c1832aca
commit
f8b2d8acb3
|
@ -23,24 +23,6 @@
|
||||||
|
|
||||||
HID_ HID;
|
HID_ HID;
|
||||||
|
|
||||||
//================================================================================
|
|
||||||
//================================================================================
|
|
||||||
// HID Interface
|
|
||||||
|
|
||||||
HIDDescriptor HID_::hidInterface;
|
|
||||||
|
|
||||||
HIDDescriptorListNode* HID_::rootNode = NULL;
|
|
||||||
uint16_t HID_::sizeof_hidReportDescriptor = 0;
|
|
||||||
uint8_t HID_::modules_count = 0;
|
|
||||||
uint8_t HID_::epType[] = { EP_TYPE_INTERRUPT_IN };
|
|
||||||
|
|
||||||
//================================================================================
|
|
||||||
//================================================================================
|
|
||||||
// Driver
|
|
||||||
|
|
||||||
uint8_t HID_::protocol = 1;
|
|
||||||
uint8_t HID_::idle = 1;
|
|
||||||
|
|
||||||
int HID_::getInterface(uint8_t* interfaceNum)
|
int HID_::getInterface(uint8_t* interfaceNum)
|
||||||
{
|
{
|
||||||
interfaceNum[0] += 1; // uses 1
|
interfaceNum[0] += 1; // uses 1
|
||||||
|
@ -128,7 +110,13 @@ bool HID_::setup(USBSetup& setup, uint8_t i)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HID_::HID_(void) : PUSBListNode(1, 1, epType)
|
// XXX: I've found no way to pass literal value directly in
|
||||||
|
// the PUSBListNode constructor
|
||||||
|
static uint8_t epTypeDef[] = { EP_TYPE_INTERRUPT_IN };
|
||||||
|
|
||||||
|
HID_::HID_(void) : PUSBListNode(1, 1, epTypeDef),
|
||||||
|
rootNode(NULL), sizeof_hidReportDescriptor(0),
|
||||||
|
modules_count(0), protocol(1), idle(1)
|
||||||
{
|
{
|
||||||
// XXX: Shall this be done in PUSBListNode(...) constructor?
|
// XXX: Shall this be done in PUSBListNode(...) constructor?
|
||||||
PluggableUSB.plug(this);
|
PluggableUSB.plug(this);
|
||||||
|
|
|
@ -87,15 +87,14 @@ protected:
|
||||||
bool setup(USBSetup& setup, uint8_t i);
|
bool setup(USBSetup& setup, uint8_t i);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static HIDDescriptor hidInterface;
|
HIDDescriptor hidInterface;
|
||||||
|
|
||||||
static HIDDescriptorListNode* rootNode;
|
HIDDescriptorListNode* rootNode;
|
||||||
static uint16_t sizeof_hidReportDescriptor;
|
uint16_t sizeof_hidReportDescriptor;
|
||||||
static uint8_t modules_count;
|
uint8_t modules_count;
|
||||||
static uint8_t epType[];
|
|
||||||
|
|
||||||
static uint8_t protocol;
|
uint8_t protocol;
|
||||||
static uint8_t idle;
|
uint8_t idle;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define D_HIDREPORT(_descriptorLength) \
|
#define D_HIDREPORT(_descriptorLength) \
|
||||||
|
|
Loading…
Reference in New Issue