2014-03-10 13:13:13 +07:00
|
|
|
/**************************************************************************/
|
|
|
|
/*!
|
|
|
|
@file hid_device.c
|
|
|
|
@author hathach (tinyusb.org)
|
|
|
|
|
|
|
|
@section LICENSE
|
|
|
|
|
|
|
|
Software License Agreement (BSD License)
|
|
|
|
|
|
|
|
Copyright (c) 2013, hathach (tinyusb.org)
|
|
|
|
All rights reserved.
|
|
|
|
|
|
|
|
Redistribution and use in source and binary forms, with or without
|
|
|
|
modification, are permitted provided that the following conditions are met:
|
|
|
|
1. Redistributions of source code must retain the above copyright
|
|
|
|
notice, this list of conditions and the following disclaimer.
|
|
|
|
2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
notice, this list of conditions and the following disclaimer in the
|
|
|
|
documentation and/or other materials provided with the distribution.
|
|
|
|
3. Neither the name of the copyright holders nor the
|
|
|
|
names of its contributors may be used to endorse or promote products
|
|
|
|
derived from this software without specific prior written permission.
|
|
|
|
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
|
|
|
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
|
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
|
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
|
|
|
|
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
|
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
|
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
|
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
|
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
|
|
|
This file is part of the tinyusb stack.
|
|
|
|
*/
|
|
|
|
/**************************************************************************/
|
|
|
|
|
|
|
|
#include "tusb_option.h"
|
|
|
|
|
|
|
|
#if (MODE_DEVICE_SUPPORTED && DEVICE_CLASS_HID)
|
|
|
|
|
|
|
|
#define _TINY_USB_SOURCE_FILE_
|
|
|
|
//--------------------------------------------------------------------+
|
|
|
|
// INCLUDE
|
|
|
|
//--------------------------------------------------------------------+
|
2018-03-12 22:45:35 +07:00
|
|
|
#include "common/tusb_common.h"
|
2014-03-10 13:13:13 +07:00
|
|
|
#include "hid_device.h"
|
2018-03-22 14:38:09 +07:00
|
|
|
#include "device/usbd_pvt.h"
|
2014-03-10 13:13:13 +07:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------+
|
|
|
|
// MACRO CONSTANT TYPEDEF
|
|
|
|
//--------------------------------------------------------------------+
|
2014-03-23 16:57:39 +07:00
|
|
|
enum {
|
|
|
|
HIDD_NUMBER_OF_SUBCLASS = 3,
|
|
|
|
HIDD_BUFFER_SIZE = 128
|
|
|
|
};
|
2014-03-10 13:13:13 +07:00
|
|
|
|
|
|
|
typedef struct {
|
2014-03-18 18:38:15 +07:00
|
|
|
uint8_t const * p_report_desc;
|
2014-03-10 13:13:13 +07:00
|
|
|
uint16_t report_length;
|
|
|
|
|
2018-03-11 15:45:11 +07:00
|
|
|
uint8_t edpt_addr;
|
2014-03-10 13:13:13 +07:00
|
|
|
uint8_t interface_number;
|
|
|
|
}hidd_interface_t;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
hidd_interface_t * const p_interface;
|
|
|
|
void (* const xfer_cb) (uint8_t, tusb_event_t, uint32_t);
|
|
|
|
uint16_t (* const get_report_cb) (uint8_t, hid_request_report_type_t, void**, uint16_t );
|
|
|
|
void (* const set_report_cb) (uint8_t, hid_request_report_type_t, uint8_t[], uint16_t);
|
|
|
|
}hidd_class_driver_t;
|
|
|
|
|
|
|
|
extern ATTR_WEAK hidd_interface_t keyboardd_data;
|
|
|
|
extern ATTR_WEAK hidd_interface_t moused_data;
|
|
|
|
|
|
|
|
static hidd_class_driver_t const hidd_class_driver[HIDD_NUMBER_OF_SUBCLASS] =
|
|
|
|
{
|
|
|
|
// [HID_PROTOCOL_NONE] = for HID Generic
|
|
|
|
|
2018-04-12 13:23:52 +07:00
|
|
|
#if CFG_TUD_HID_KEYBOARD
|
2014-03-10 13:13:13 +07:00
|
|
|
[HID_PROTOCOL_KEYBOARD] =
|
|
|
|
{
|
|
|
|
.p_interface = &keyboardd_data,
|
2018-03-01 12:51:19 +07:00
|
|
|
.xfer_cb = tud_hid_keyboard_cb,
|
|
|
|
.get_report_cb = tud_hid_keyboard_get_report_cb,
|
|
|
|
.set_report_cb = tud_hid_keyboard_set_report_cb
|
2014-03-10 13:13:13 +07:00
|
|
|
},
|
|
|
|
#endif
|
|
|
|
|
2018-04-12 13:23:52 +07:00
|
|
|
#if CFG_TUD_HID_MOUSE
|
2014-03-10 13:13:13 +07:00
|
|
|
[HID_PROTOCOL_MOUSE] =
|
|
|
|
{
|
|
|
|
.p_interface = &moused_data,
|
2018-03-11 15:45:11 +07:00
|
|
|
.xfer_cb = tud_hid_mouse_cb,
|
|
|
|
.get_report_cb = tud_hid_mouse_get_report_cb,
|
|
|
|
.set_report_cb = tud_hid_mouse_set_report_cb
|
2014-03-10 13:13:13 +07:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
2014-03-23 16:57:39 +07:00
|
|
|
// internal buffer for transferring data
|
2018-04-10 14:31:11 +07:00
|
|
|
CFG_TUSB_ATTR_USBRAM STATIC_VAR uint8_t m_hid_buffer[ HIDD_BUFFER_SIZE ];
|
2014-03-10 13:13:13 +07:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------+
|
|
|
|
// KEYBOARD APPLICATION API
|
|
|
|
//--------------------------------------------------------------------+
|
2018-04-12 13:23:52 +07:00
|
|
|
#if CFG_TUD_HID_KEYBOARD
|
2014-03-18 18:38:15 +07:00
|
|
|
STATIC_VAR hidd_interface_t keyboardd_data;
|
2014-03-10 13:13:13 +07:00
|
|
|
|
2018-03-23 12:17:47 +07:00
|
|
|
bool tud_hid_keyboard_busy(uint8_t rhport)
|
2014-03-10 13:13:13 +07:00
|
|
|
{
|
2018-03-28 13:47:58 +07:00
|
|
|
return dcd_edpt_busy(rhport, keyboardd_data.edpt_addr);
|
2014-03-10 13:13:13 +07:00
|
|
|
}
|
|
|
|
|
2018-03-23 12:17:47 +07:00
|
|
|
tusb_error_t tud_hid_keyboard_send(uint8_t rhport, hid_keyboard_report_t const *p_report)
|
2014-03-10 13:13:13 +07:00
|
|
|
{
|
2018-03-12 22:37:12 +07:00
|
|
|
VERIFY(tud_mounted(), TUSB_ERROR_USBD_DEVICE_NOT_CONFIGURED);
|
2014-03-10 13:13:13 +07:00
|
|
|
|
2018-03-23 12:17:47 +07:00
|
|
|
hidd_interface_t * p_kbd = &keyboardd_data; // TODO &keyboardd_data[rhport];
|
2014-03-10 13:13:13 +07:00
|
|
|
|
2018-03-28 13:47:58 +07:00
|
|
|
TU_ASSERT( dcd_edpt_xfer(rhport, p_kbd->edpt_addr, (void*) p_report, sizeof(hid_keyboard_report_t)), TUSB_ERROR_DCD_EDPT_XFER ) ;
|
2014-03-10 13:13:13 +07:00
|
|
|
|
|
|
|
return TUSB_ERROR_NONE;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------+
|
|
|
|
// MOUSE APPLICATION API
|
|
|
|
//--------------------------------------------------------------------+
|
2018-04-12 13:23:52 +07:00
|
|
|
#if CFG_TUD_HID_MOUSE
|
2014-03-18 18:38:15 +07:00
|
|
|
STATIC_VAR hidd_interface_t moused_data;
|
2014-03-10 13:13:13 +07:00
|
|
|
|
2018-03-23 12:17:47 +07:00
|
|
|
bool tud_hid_mouse_is_busy(uint8_t rhport)
|
2014-03-10 13:13:13 +07:00
|
|
|
{
|
2018-03-28 13:47:58 +07:00
|
|
|
return dcd_edpt_busy(rhport, moused_data.edpt_addr);
|
2014-03-10 13:13:13 +07:00
|
|
|
}
|
|
|
|
|
2018-03-23 12:17:47 +07:00
|
|
|
tusb_error_t tud_hid_mouse_send(uint8_t rhport, hid_mouse_report_t const *p_report)
|
2014-03-10 13:13:13 +07:00
|
|
|
{
|
2018-03-12 22:37:12 +07:00
|
|
|
VERIFY(tud_mounted(), TUSB_ERROR_USBD_DEVICE_NOT_CONFIGURED);
|
2014-03-10 13:13:13 +07:00
|
|
|
|
2018-03-23 12:17:47 +07:00
|
|
|
hidd_interface_t * p_mouse = &moused_data; // TODO &keyboardd_data[rhport];
|
2014-03-10 13:13:13 +07:00
|
|
|
|
2018-03-28 13:47:58 +07:00
|
|
|
TU_ASSERT( dcd_edpt_xfer(rhport, p_mouse->edpt_addr, (void*) p_report, sizeof(hid_mouse_report_t)), TUSB_ERROR_DCD_EDPT_XFER ) ;
|
2014-03-10 13:13:13 +07:00
|
|
|
|
|
|
|
return TUSB_ERROR_NONE;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------+
|
|
|
|
// USBD-CLASS API
|
|
|
|
//--------------------------------------------------------------------+
|
|
|
|
static void interface_clear(hidd_interface_t * p_interface)
|
|
|
|
{
|
|
|
|
if ( p_interface != NULL )
|
|
|
|
{
|
|
|
|
memclr_(p_interface, sizeof(hidd_interface_t));
|
|
|
|
p_interface->interface_number = INTERFACE_INVALID_NUMBER;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void hidd_init(void)
|
|
|
|
{
|
|
|
|
for(uint8_t i=0; i<HIDD_NUMBER_OF_SUBCLASS; i++)
|
|
|
|
{
|
|
|
|
interface_clear( hidd_class_driver[i].p_interface );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-07-13 16:09:26 +07:00
|
|
|
void hidd_reset(uint8_t rhport)
|
2014-03-10 13:13:13 +07:00
|
|
|
{
|
|
|
|
for(uint8_t i=0; i<HIDD_NUMBER_OF_SUBCLASS; i++)
|
|
|
|
{
|
|
|
|
interface_clear(hidd_class_driver[i].p_interface);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-03-23 12:17:47 +07:00
|
|
|
tusb_error_t hidd_control_request_st(uint8_t rhport, tusb_control_request_t const * p_request)
|
2014-03-10 13:13:13 +07:00
|
|
|
{
|
|
|
|
uint8_t subclass_idx;
|
|
|
|
for(subclass_idx=0; subclass_idx<HIDD_NUMBER_OF_SUBCLASS; subclass_idx++)
|
|
|
|
{
|
|
|
|
hidd_interface_t * const p_interface = hidd_class_driver[subclass_idx].p_interface;
|
2014-03-18 16:58:24 +07:00
|
|
|
if ( (p_interface != NULL) && (p_request->wIndex == p_interface->interface_number) ) break;
|
2014-03-10 13:13:13 +07:00
|
|
|
}
|
|
|
|
|
2018-03-22 14:38:09 +07:00
|
|
|
TU_ASSERT(subclass_idx < HIDD_NUMBER_OF_SUBCLASS, TUSB_ERROR_FAILED);
|
2014-03-10 13:13:13 +07:00
|
|
|
|
|
|
|
hidd_class_driver_t const * const p_driver = &hidd_class_driver[subclass_idx];
|
|
|
|
hidd_interface_t* const p_hid = p_driver->p_interface;
|
|
|
|
|
2018-03-22 14:38:09 +07:00
|
|
|
OSAL_SUBTASK_BEGIN
|
|
|
|
|
2014-03-10 13:13:13 +07:00
|
|
|
//------------- STD Request -------------//
|
2018-03-11 21:05:27 +07:00
|
|
|
if (p_request->bmRequestType_bit.type == TUSB_REQ_TYPE_STANDARD)
|
2014-03-10 13:13:13 +07:00
|
|
|
{
|
|
|
|
uint8_t const desc_type = u16_high_u8(p_request->wValue);
|
|
|
|
uint8_t const desc_index = u16_low_u8 (p_request->wValue);
|
|
|
|
|
|
|
|
(void) desc_index;
|
|
|
|
|
2018-03-22 14:38:09 +07:00
|
|
|
if (p_request->bRequest == TUSB_REQ_GET_DESCRIPTOR && desc_type == HID_DESC_TYPE_REPORT)
|
|
|
|
{
|
2018-03-22 16:25:24 +07:00
|
|
|
STASK_ASSERT ( p_hid->report_length <= HIDD_BUFFER_SIZE );
|
2018-03-22 14:38:09 +07:00
|
|
|
|
|
|
|
// copy to allow report descriptor not to be in USBRAM
|
|
|
|
memcpy(m_hid_buffer, p_hid->p_report_desc, p_hid->report_length);
|
2014-03-10 13:13:13 +07:00
|
|
|
|
2018-03-31 14:09:48 +07:00
|
|
|
usbd_control_xfer_st(rhport, p_request->bmRequestType_bit.direction, m_hid_buffer, p_hid->report_length);
|
2018-03-22 14:38:09 +07:00
|
|
|
}else
|
|
|
|
{
|
2018-03-28 13:54:28 +07:00
|
|
|
dcd_control_stall(rhport);
|
2018-03-22 14:38:09 +07:00
|
|
|
}
|
2014-03-10 13:13:13 +07:00
|
|
|
}
|
|
|
|
//------------- Class Specific Request -------------//
|
2018-03-11 21:05:27 +07:00
|
|
|
else if (p_request->bmRequestType_bit.type == TUSB_REQ_TYPE_CLASS)
|
2014-03-10 13:13:13 +07:00
|
|
|
{
|
|
|
|
if( (HID_REQUEST_CONTROL_GET_REPORT == p_request->bRequest) && (p_driver->get_report_cb != NULL) )
|
|
|
|
{
|
|
|
|
// wValue = Report Type | Report ID
|
|
|
|
void* p_buffer = NULL;
|
|
|
|
|
2018-03-23 12:17:47 +07:00
|
|
|
uint16_t actual_length = p_driver->get_report_cb(rhport, (hid_request_report_type_t) u16_high_u8(p_request->wValue),
|
2014-03-10 13:13:13 +07:00
|
|
|
&p_buffer, p_request->wLength);
|
2018-03-22 16:25:24 +07:00
|
|
|
STASK_ASSERT( p_buffer != NULL && actual_length > 0 );
|
2014-03-10 13:13:13 +07:00
|
|
|
|
2018-03-31 14:09:48 +07:00
|
|
|
usbd_control_xfer_st(rhport, p_request->bmRequestType_bit.direction, p_buffer, actual_length);
|
2014-03-10 13:13:13 +07:00
|
|
|
}
|
|
|
|
else if ( (HID_REQUEST_CONTROL_SET_REPORT == p_request->bRequest) && (p_driver->set_report_cb != NULL) )
|
|
|
|
{
|
|
|
|
// return TUSB_ERROR_DCD_CONTROL_REQUEST_NOT_SUPPORT; // TODO test STALL control out endpoint (with mouse+keyboard)
|
|
|
|
// wValue = Report Type | Report ID
|
2018-03-31 14:09:48 +07:00
|
|
|
usbd_control_xfer_st(rhport, p_request->bmRequestType_bit.direction, m_hid_buffer, p_request->wLength);
|
2014-03-10 13:13:13 +07:00
|
|
|
|
2018-03-23 12:17:47 +07:00
|
|
|
p_driver->set_report_cb(rhport, u16_high_u8(p_request->wValue), m_hid_buffer, p_request->wLength);
|
2014-03-10 13:13:13 +07:00
|
|
|
}
|
|
|
|
else if (HID_REQUEST_CONTROL_SET_IDLE == p_request->bRequest)
|
|
|
|
{
|
|
|
|
// uint8_t idle_rate = u16_high_u8(p_request->wValue);
|
2018-03-28 13:54:28 +07:00
|
|
|
dcd_control_status(rhport, p_request->bmRequestType_bit.direction);
|
2014-03-10 13:13:13 +07:00
|
|
|
}else
|
|
|
|
{
|
|
|
|
// HID_REQUEST_CONTROL_GET_IDLE:
|
|
|
|
// HID_REQUEST_CONTROL_GET_PROTOCOL:
|
|
|
|
// HID_REQUEST_CONTROL_SET_PROTOCOL:
|
2018-03-28 13:54:28 +07:00
|
|
|
dcd_control_stall(rhport);
|
2014-03-10 13:13:13 +07:00
|
|
|
}
|
|
|
|
}else
|
|
|
|
{
|
2018-03-28 13:54:28 +07:00
|
|
|
dcd_control_stall(rhport);
|
2014-03-10 13:13:13 +07:00
|
|
|
}
|
|
|
|
|
2018-03-22 14:38:09 +07:00
|
|
|
OSAL_SUBTASK_END
|
2014-03-10 13:13:13 +07:00
|
|
|
}
|
|
|
|
|
2018-03-23 12:32:40 +07:00
|
|
|
tusb_error_t hidd_open(uint8_t rhport, tusb_desc_interface_t const * p_interface_desc, uint16_t *p_length)
|
2014-03-10 13:13:13 +07:00
|
|
|
{
|
|
|
|
uint8_t const *p_desc = (uint8_t const *) p_interface_desc;
|
|
|
|
|
|
|
|
//------------- HID descriptor -------------//
|
2018-07-13 17:48:26 +07:00
|
|
|
p_desc += p_desc[DESC_OFFSET_LEN];
|
2014-03-10 13:13:13 +07:00
|
|
|
tusb_hid_descriptor_hid_t const *p_desc_hid = (tusb_hid_descriptor_hid_t const *) p_desc;
|
2018-03-29 13:07:27 +07:00
|
|
|
TU_ASSERT(HID_DESC_TYPE_HID == p_desc_hid->bDescriptorType, TUSB_ERROR_HIDD_DESCRIPTOR_INTERFACE);
|
2014-03-10 13:13:13 +07:00
|
|
|
|
|
|
|
//------------- Endpoint Descriptor -------------//
|
2018-07-13 17:48:26 +07:00
|
|
|
p_desc += p_desc[DESC_OFFSET_LEN];
|
2018-03-23 12:32:40 +07:00
|
|
|
tusb_desc_endpoint_t const *p_desc_endpoint = (tusb_desc_endpoint_t const *) p_desc;
|
2018-03-29 13:07:27 +07:00
|
|
|
TU_ASSERT(TUSB_DESC_ENDPOINT == p_desc_endpoint->bDescriptorType, TUSB_ERROR_HIDD_DESCRIPTOR_INTERFACE);
|
2014-03-10 13:13:13 +07:00
|
|
|
|
|
|
|
if (p_interface_desc->bInterfaceSubClass == HID_SUBCLASS_BOOT)
|
|
|
|
{
|
|
|
|
switch(p_interface_desc->bInterfaceProtocol)
|
|
|
|
{
|
|
|
|
case HID_PROTOCOL_KEYBOARD:
|
|
|
|
case HID_PROTOCOL_MOUSE:
|
|
|
|
{
|
|
|
|
hidd_class_driver_t const * const p_driver = &hidd_class_driver[p_interface_desc->bInterfaceProtocol];
|
|
|
|
hidd_interface_t * const p_hid = p_driver->p_interface;
|
|
|
|
|
2018-03-06 17:22:40 +07:00
|
|
|
VERIFY(p_hid, TUSB_ERROR_FAILED);
|
2014-03-10 13:13:13 +07:00
|
|
|
|
2018-03-28 13:47:58 +07:00
|
|
|
VERIFY( dcd_edpt_open(rhport, p_desc_endpoint), TUSB_ERROR_DCD_FAILED );
|
2018-03-11 15:45:11 +07:00
|
|
|
|
|
|
|
p_hid->edpt_addr = p_desc_endpoint->bEndpointAddress;
|
2014-03-10 13:13:13 +07:00
|
|
|
|
|
|
|
p_hid->interface_number = p_interface_desc->bInterfaceNumber;
|
2014-03-18 18:38:15 +07:00
|
|
|
p_hid->p_report_desc = (p_interface_desc->bInterfaceProtocol == HID_PROTOCOL_KEYBOARD) ? tusbd_descriptor_pointers.p_hid_keyboard_report : tusbd_descriptor_pointers.p_hid_mouse_report;
|
2014-03-10 13:13:13 +07:00
|
|
|
p_hid->report_length = p_desc_hid->wReportLength;
|
|
|
|
|
2018-03-06 17:22:40 +07:00
|
|
|
VERIFY(p_hid->p_report_desc, TUSB_ERROR_DESCRIPTOR_CORRUPTED);
|
2014-03-10 13:13:13 +07:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
default: // TODO unknown, unsupported protocol --> skip this interface
|
|
|
|
return TUSB_ERROR_HIDD_DESCRIPTOR_INTERFACE;
|
|
|
|
}
|
2018-03-23 12:32:40 +07:00
|
|
|
*p_length = sizeof(tusb_desc_interface_t) + sizeof(tusb_hid_descriptor_hid_t) + sizeof(tusb_desc_endpoint_t);
|
2014-03-10 13:13:13 +07:00
|
|
|
}else
|
|
|
|
{
|
|
|
|
// open generic
|
|
|
|
*p_length = 0;
|
|
|
|
return TUSB_ERROR_HIDD_DESCRIPTOR_INTERFACE;
|
|
|
|
}
|
|
|
|
return TUSB_ERROR_NONE;
|
|
|
|
}
|
|
|
|
|
2018-03-23 12:17:47 +07:00
|
|
|
tusb_error_t hidd_xfer_cb(uint8_t rhport, uint8_t edpt_addr, tusb_event_t event, uint32_t xferred_bytes)
|
2014-03-10 13:13:13 +07:00
|
|
|
{
|
|
|
|
for(uint8_t i=0; i<HIDD_NUMBER_OF_SUBCLASS; i++)
|
|
|
|
{
|
|
|
|
hidd_interface_t * const p_interface = hidd_class_driver[i].p_interface;
|
2018-03-11 15:45:11 +07:00
|
|
|
if ( (p_interface != NULL) && (edpt_addr == p_interface->edpt_addr) )
|
2014-03-10 13:13:13 +07:00
|
|
|
{
|
2018-03-23 12:17:47 +07:00
|
|
|
hidd_class_driver[i].xfer_cb(rhport, event, xferred_bytes);
|
2014-03-10 13:13:13 +07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return TUSB_ERROR_NONE;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|