码迷,mamicode.com
首页 > Windows程序 > 详细

win7 多点触摸USB的触摸屏

时间:2016-05-20 06:12:15      阅读:184      评论:0      收藏:0      [点我收藏+]

标签:

 

USB.C
读取bCommon判断执行哪个动作
   if (bCommon & rbRSUINT)//0x02          // Handle Resume interrupt
   {
       Usb_Resume();
   }
   if (bCommon & rbRSTINT)          // Handle Reset interrupt
   {
       Usb_Reset();
   }
   if (bCommon & rbSUSINT)          // Handle Suspend interrupt
   {
       Usb_Suspend();
   }
   if (bIn & rbEP0)                 // Handle Setup packet received
   {                                // or packet transmitted if Endpoint 0
       Handle_Setup();               // is transmit mode
   }
   if (bIn & rbIN1)                 // Handle In Packet sent, put new data
   {                                // on endpoint 1 fifo
       Handle_In1();
   }
   if (bOut & rbOUT2)               // Handle Out packet received, take data
   {                                // off endpoint 2 fifo
       Handle_Out2();
   }

void Handle_Setup(),标准请求和类请求
               switch ( Setup.bmRequestType & DRT_MASK )     // Device Request Type
               {
                    case DRT_STD:                                   // Standard device request
                         Standard_Device_Request();
                         break;
                    case DRT_CLASS:                                   // class specific request
                         Class_Request();
                         break;

                    case DRT_VENDOR:                              // vendor request
                         Vendor_Request();
                         break;

                    default:
                         break;
               }
void Class_Request( void )类请求实现Get_Report,Set_Report
{
     if ( Setup.wIndex.i == DSC_INTERFACE_HID )          // interface index must match to the HID IF
     {
          switch( Setup.bRequest )                         // dispatch according to the bRequest
          {
               case HID_REQ_GET_REPORT:          Get_Report();          break;
               case HID_REQ_SET_REPORT:          Set_Report();          break;

 

win7 多点触摸USB的触摸屏

标签:

原文地址:http://www.cnblogs.com/zkp2010/p/5510747.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!