@@ -31,16 +31,16 @@ int HID_::getInterface(uint8_t* interfaceCount)
3131{
3232 *interfaceCount += 1 ; // uses 1
3333 HIDDescriptor hidInterface = {
34- D_INTERFACE (interface () , 1 , 3 , 0 , 0 ),
34+ D_INTERFACE (pluggedInterface , 1 , 3 , 0 , 0 ),
3535 D_HIDREPORT (descriptorSize),
36- D_ENDPOINT (USB_ENDPOINT_IN (endpoint () ), USB_ENDPOINT_TYPE_INTERRUPT, USB_EP_SIZE, 0x01 )
36+ D_ENDPOINT (USB_ENDPOINT_IN (pluggedEndpoint ), USB_ENDPOINT_TYPE_INTERRUPT, USB_EP_SIZE, 0x01 )
3737 };
3838 return USB_SendControl (0 , &hidInterface, sizeof (hidInterface));
3939}
4040
4141int HID_::getDescriptor (USBSetup& setup)
4242{
43- if (interface () != setup.wIndex ) {
43+ if (pluggedInterface != setup.wIndex ) {
4444 return 0 ;
4545 }
4646
@@ -71,13 +71,13 @@ void HID_::AppendDescriptor(HIDDescriptorListNode *node)
7171
7272void HID_::SendReport (uint8_t id, const void * data, int len)
7373{
74- USB_Send (endpoint () , &id, 1 );
75- USB_Send (endpoint () | TRANSFER_RELEASE, data, len);
74+ USB_Send (pluggedEndpoint , &id, 1 );
75+ USB_Send (pluggedEndpoint | TRANSFER_RELEASE, data, len);
7676}
7777
7878bool HID_::setup (USBSetup& setup)
7979{
80- if (interface () != setup.wIndex ) {
80+ if (pluggedInterface != setup.wIndex ) {
8181 return false ;
8282 }
8383
0 commit comments