USB接收的数据
void DevEP2_OUT_Deal( uint8_t l )
{
uint8_t i;
app_usb_notify(pEP2_OUT_DataBuf, l);
}
用什么方法把HID报告填入
static void hidEmuSendTouchReport(uint8_t touch, uint8_t ID, uint16_t X_data, uint16_t Y_data)
{
uint8_t buf[HID_TOUCH_IN_RPT_LEN];
buf[0] = touch; // touch or not
buf[1] = ID; // touch ID
buf[2] = (uint8_t)X_data; // X axis data low 8bit
buf[3] = (uint8_t)(X_data >> 8); // X axis data high 8bit
buf[4] = (uint8_t)Y_data; // Y axis data low 8bit
buf[5] = (uint8_t)(Y_data >> 8); // Y axis data high 8bit
HidDev_Report(HID_RPT_ID_TOUCH_IN, HID_REPORT_TYPE_INPUT,
HID_TOUCH_IN_RPT_LEN, buf);
}
函数中发送出去。