亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? hidclass.asm

?? This example implements a gameport translator on the PIC16C765. The firmware translates a gaming d
?? ASM
字號:
;                            Software License Agreement
;
; The software supplied herewith by Microchip Technology Incorporated (the "Company")
; for its PICmicro(r) Microcontroller is intended and supplied to you, the Company's
; customer, for use solely and exclusively on Microchip PICmicro Microcontroller
; products.
;
; The software is owned by the Company and/or its supplier, and is protected under
; applicable copyright laws. All rights are reserved. Any use in violation of the
; foregoing restrictions may subject the user to criminal sanctions under applicable
; laws, as well as to civil liability for the breach of the terms and conditions of
; this license.
;
; THIS SOFTWARE IS PROVIDED IN AN "AS IS" CONDITION. NO WARRANTIES, WHETHER EXPRESS,
; IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
; MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE
; COMPANY SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR
; CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
;
; ###############################################################################
;   filename:           HIDCLASS.ASM
;
;   Implements USB Human Interface Device (HID) class specific commands.
;
; ###############################################################################
;
;   Author(s):          Dan Butler and Reston Condit
;   Company:            Microchip Technology Inc
;
;   Revision:           1.21
;   Date:               08 August 2001
;   Assembled using     MPASM 2.61
;   Revision History:
;   23 August 2000      DZB Changed descriptor pointers to 16 bits.
;   24 August 2000      DZB Moved EP1 & 2 configuration from USBReset
;                           to Set_Configuration to implement requirement in
;                           USB V1.1 spec paragraph 5.3.1.2
;   28 August 2000      DZB Force data toggle on OUT packets in PutUSB
;   20 March 2001       DZB Reduced use of common RAM
;   20 March 2001       DZB Put and Get use their own temp variable (GPtemp) to
;                           avoid collisions with the ISR's use of temp.
;   29 March 2001       DZB Fixed saving of bank bits in GetUSB
;   02 May 2001         DZB Implemented SHOW_ENUM_STATUS to show enumeration
;                           status on the PORTB LEDs: 0- Powered, 1- Default,
;                           2- addressed, 3- configured, 4- sleep, 
;                           5- EP0 Activity, 6- EP1 Activity, 7- EP2 Activity
;   03 August 2001      RAC Made distinct GetEP and PutEP macros for endpoints 1 
;                           and 2.  These functions are GetEP1, GetEP2, PutEP1, and 
;                           PutEP2.  Instances of the these macros are created in
;                           usb_ch9.asm.
;   08 August 2001      RAC Corrected various banking and paging issues.
;   15 August           RAC Added Report_desc_index function in descript.asm.
;                           This function allows more than one report descriptor
;                           to be used. 
;
;################################################################################
;
;   include files:
;       P16C765.inc     Rev 1.00
;       usb_defs.inc    Rev 1.00
;
;################################################################################
#include <p16C765.inc>
#include "usb_defs.inc"

    extern  ReportDescriptor
    extern  ReportDescriptorLen
    extern  HID_Descriptor
    extern  Descriptions
    extern  BufferData
    extern  BufferDescriptor
    extern  wrongstate
    extern  USB_dev_req
    extern  EP0_maxLength
    extern  EP0_start
    extern  EP0_end
    extern  copy_descriptor_to_EP0
    extern  Send_0Len_pkt
    extern  Report_desc_index

    global  ClassSpecificRequest
 
USBBANK     code
; ******************************************************************
; Get Class Specific Descriptor
; ******************************************************************

ClassSpecificRequest
    pagesel Dev2HostHIDRequest
    movf    BufferData+bmRequestType,w
    xorlw   0x21
    btfsc   STATUS,Z
    goto    Host2DevHIDRequest

    movf    BufferData+bmRequestType,w
    xorlw   0x22
    btfsc   STATUS,Z
    goto    Host2DevReportRequest

    movf    BufferData+bmRequestType,w
    xorlw   0x23
    btfsc   STATUS,Z
    goto    Host2DevPhysicalRequest

    movf    BufferData+bmRequestType,w
    xorlw   0xA1
    btfsc   STATUS,Z
    goto    Dev2HostHIDRequest

    movf    BufferData+bmRequestType,w
    xorlw   0xA2
    btfsc   STATUS,Z
    goto    Dev2HostReportRequest

    movf    BufferData+bmRequestType,w
    xorlw   0xA3
    btfsc   STATUS,Z
    goto    Dev2HostPhysicalRequest

    pagesel wrongstate
    goto    wrongstate    

    ; Need to add code if you need to handle optional functions
    ; such as get/set_idle. Otherwise, send STALL buy calling
    ; to signal the host that the feature is not implemented.

Host2DevHIDRequest
    movf    BufferData+bRequest,w
    xorlw   0x01
    btfsc   STATUS,Z
    goto    GetHIDReport

    movf    BufferData+bRequest,w
    xorlw   0x02
    btfsc   STATUS,Z
    goto    GetIdle

    movf    BufferData+bRequest,w
    xorlw   0x03
    btfsc   STATUS,Z
    goto    GetPhysical

    movf    BufferData+bRequest,w
    xorlw   0x06
    btfsc   STATUS,Z
    goto    Get_Report_Descriptor

    movf    BufferData+bRequest,w
    xorlw   0x09
    btfsc   STATUS,Z
    goto    SetHIDReport

    movf    BufferData+bRequest,w
    xorlw   0x0A
    btfsc   STATUS,Z
    goto    SetIdle

    movf    BufferData+bRequest,w
    xorlw   0x0B
    btfsc   STATUS,Z
    goto    SetProtocol

    pagesel wrongstate
    goto    wrongstate
    
; ******************************************************************
; Get Report Descriptor
; Returns the Mouse Report descriptor
; Checks for the report type (input, output or Feature).
; ******************************************************************
Get_Report_Descriptor
    global  Get_Report_Descriptor
    banksel EP0_start
    movlw   GET_DESCRIPTOR
    movwf   USB_dev_req     ; currently processing a get descriptor request

    movlw   8
    movwf   EP0_maxLength

    movf    BufferData+(wValue+1),w ; check report ID
    xorlw   0x01                    ; was it an Input Report?
    btfsc   STATUS,Z
    goto    TryOutputReport

    pagesel Descriptions
    bcf     STATUS,C
    rlf     BufferData+wIndex,w
    call    Report_desc_index   ; translate index to offset into descriptor table
    movwf   EP0_start
    bcf     STATUS,C
    rlf     BufferData+wIndex,w
    addlw   1                   ; point to high order byte
    call    Report_desc_index   ; translate index to offset into descriptor table
    movwf   EP0_start+1
    call    Descriptions
    movwf   EP0_end
    pagesel CheckReportLength
    incf    EP0_start,f
    goto    CheckReportLength

TryOutputReport
    movf    BufferData+(wValue+1),w ; check report ID
    xorlw   0x02                    ; was it an Output Report?
    btfsc   STATUS,Z
    goto    TryFeatureReport

    pagesel Descriptions
    bcf     STATUS,C
    rlf     BufferData+wIndex,w
    call    Report_desc_index   ; translate index to offset into descriptor table
    movwf   EP0_start
    bcf     STATUS,C
    rlf     BufferData+wIndex,w
    addlw   1                   ; point to high order byte
    call    Report_desc_index   ; translate index to offset into descriptor table
    movwf   EP0_start+1
    call    Descriptions
    movwf   EP0_end
    pagesel CheckReportLength
    incf    EP0_start,f
    goto    CheckReportLength

TryFeatureReport
    movf    BufferData+(wValue+1),w ; check report ID
    xorlw   0x03            ; was it an Output Report?
    pagesel wrongstate
    btfsc   STATUS,Z
    goto    wrongstate

; Fill EP0IN buffer here...
    return
    
CheckReportLength
    movf    BufferData+(wLength+1),w ; Is the host requesting more than 255 bytes?
    btfss   STATUS,Z        ; If so, the host is requesting more than we have
    goto    nolimit_rpt

check_low_bytes
    movf    BufferData+wLength,w
    subwf   EP0_end,w       ; if not, compare the amount the host is request
    movf    BufferData+wLength,w ; with the length of the descriptor
    btfsc   STATUS,C        ; if the host is request less than the descriptor
    movwf   EP0_end         ; length, send only as much as what the host wants

nolimit_rpt
    incf    EP0_end,f
    pagesel copy_descriptor_to_EP0        
    call    copy_descriptor_to_EP0
    return

Get_HID_Descriptor
    global  Get_HID_Descriptor
    movlw   GET_DESCRIPTOR
    movwf   USB_dev_req     ; currently processing a get descriptor request

    movlw   8
    movwf   EP0_maxLength

    movlw   low HID_Descriptor
    movwf   EP0_start
    movlw   high HID_Descriptor
    movwf   EP0_start + 1
    pagesel Descriptions
    call    Descriptions    ; get the HID descriptor length
    movwf   EP0_end
    pagesel Get_HID_Descriptor

    movf    BufferData+(wLength+1),f
    btfss   STATUS,Z
    goto    nolimit_hid

    subwf   BufferData+wLength,w
    movf    BufferData+wLength,w
    btfss   STATUS,C
    movwf   EP0_end

nolimit_hid
    incf    EP0_end,f
    pagesel copy_descriptor_to_EP0
    call    copy_descriptor_to_EP0
    return

Get_Physical_Descriptor
    return

Check_Class_Specific_IN
    global  Check_Class_Specific_IN
    pagesel copy_descriptor_to_EP0
    movf    USB_dev_req,w
    xorlw   GET_DESCRIPTOR
    btfsc   STATUS,Z
    call    copy_descriptor_to_EP0
    return

; ******************************************************************
; These requests are parsed out, but nothing is actually done with them
; currently they simply stall EP0 to show that the request is not
; supported.  If you need to support them, fill in the code.
; ******************************************************************
Host2DevReportRequest
Host2DevPhysicalRequest
Dev2HostHIDRequest
Dev2HostReportRequest
Dev2HostPhysicalRequest
GetHIDReport
GetIdle
GetPhysical
SetIdle
    pagesel wrongstate
    goto    wrongstate

SetHIDReport
    movlw   HID_SET_REPORT
    movwf   USB_dev_req     ; store status
    banksel BD0OST
    movlw   0xc8            ; reset buffer
    movwf   BD0OST           
    return

; ******************************************************************
; As written, Set Protocol merely returns a zero length packet to keep the OS happy.
; If your application actually needs to do something with the protocol value specified
; here's where to add the code.
; ******************************************************************
SetProtocol
    banksel BD0IBC          ; select bank 3
    movlw   0x00
    movwf   BD0IBC          ; set the byte count field to zero
    movlw   0xc8    
    movwf   BD0IST          ; Set the OWNs bit

; Add code here to actually do something with the protocol value specified.
    return
    
    end

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩vs国产vs欧美| 91精品国产高清一区二区三区蜜臀 | 国产一区二三区| 美女在线视频一区| 喷水一区二区三区| 美国毛片一区二区| 国内精品写真在线观看| 国产高清成人在线| 成人av电影免费观看| av中文字幕在线不卡| 91视频在线观看| 在线欧美日韩精品| 51精品秘密在线观看| 欧美一区二区在线观看| 精品日韩在线观看| 亚洲精品一线二线三线无人区| 精品国产亚洲在线| 国产欧美精品一区二区三区四区| 中文字幕日韩一区二区| 亚洲精品亚洲人成人网在线播放| 亚洲综合免费观看高清完整版| 丝袜亚洲另类欧美综合| 精一区二区三区| 大美女一区二区三区| 色av综合在线| 日韩一级片在线观看| 久久精品无码一区二区三区| 综合电影一区二区三区 | 久久电影网电视剧免费观看| 极品少妇xxxx精品少妇偷拍| 国产乱子伦视频一区二区三区| 北条麻妃一区二区三区| 欧美色网站导航| 日韩欧美国产三级电影视频| 日本一区二区三区在线观看| 一区二区三区在线播| 老司机午夜精品99久久| 成人18视频在线播放| 欧美日韩三级在线| 久久一夜天堂av一区二区三区| 亚洲人快播电影网| 日本va欧美va欧美va精品| 国产成人av一区二区三区在线| 日本高清不卡aⅴ免费网站| 日韩欧美一区在线| 综合亚洲深深色噜噜狠狠网站| 丝袜亚洲另类欧美| 成人午夜av影视| 欧美一区二区三区成人| 国产精品麻豆一区二区| 热久久免费视频| 成人app网站| 欧美v国产在线一区二区三区| 一区在线中文字幕| 久草中文综合在线| 欧美性色黄大片| 日本一区二区视频在线观看| 爽好多水快深点欧美视频| 国产成+人+日韩+欧美+亚洲| 欧美精选在线播放| 中文字幕一区在线| 久久国产三级精品| 国产精品国产三级国产a| 亚洲不卡一区二区三区| 粉嫩av亚洲一区二区图片| 欧美丰满嫩嫩电影| 亚洲乱码国产乱码精品精的特点| 激情成人午夜视频| 欧美日韩国产综合草草| 最新日韩av在线| 国产91在线看| 精品成人a区在线观看| 首页亚洲欧美制服丝腿| 91九色最新地址| 国产精品理伦片| 国产suv一区二区三区88区| 欧美一区二区三区不卡| 亚洲成人先锋电影| 色婷婷av一区二区| 中文字幕+乱码+中文字幕一区| 麻豆91精品91久久久的内涵| 欧美日韩一区二区三区四区五区| 日韩一区在线看| 成人精品gif动图一区| 久久久久久久综合色一本| 乱一区二区av| 日韩限制级电影在线观看| 亚洲第一av色| 欧美日韩小视频| 亚洲一区国产视频| 欧洲精品一区二区| 亚洲自拍另类综合| 色欧美日韩亚洲| 亚洲色图欧洲色图婷婷| bt欧美亚洲午夜电影天堂| 国产欧美日产一区| 国产成人精品1024| 日本一区二区视频在线观看| 国产一区二区三区四区在线观看 | 国产精品色一区二区三区| 国产盗摄女厕一区二区三区| 欧美电视剧免费全集观看| 久久精品久久综合| 精品国产一区二区亚洲人成毛片| 另类综合日韩欧美亚洲| 日韩一级黄色大片| 久久99精品久久久久婷婷| 精品少妇一区二区三区| 国产精品一区二区男女羞羞无遮挡| 精品日韩一区二区三区| 国产一区二区在线影院| 国产清纯美女被跳蛋高潮一区二区久久w | 日韩不卡一区二区| 日韩一区二区三区在线观看| 另类调教123区| 2017欧美狠狠色| 国产aⅴ综合色| 中文字幕一区二区三区四区| 91蜜桃传媒精品久久久一区二区| 一级中文字幕一区二区| 欧美日韩亚洲另类| 久久不见久久见免费视频1| 久久久欧美精品sm网站| 成人精品视频一区二区三区尤物| 国产精品成人一区二区三区夜夜夜| 99久久免费精品| 亚洲一区二区三区爽爽爽爽爽 | 国产精品你懂的在线欣赏| a4yy欧美一区二区三区| 亚洲动漫第一页| 日韩精品一区二区三区蜜臀| 国产激情视频一区二区在线观看| 一区精品在线播放| 欧美精品1区2区3区| 国产精品一级在线| 一区二区三区免费| 日韩精品一区二区三区视频在线观看| 国产99久久久久久免费看农村| 亚洲免费高清视频在线| 91精品国产全国免费观看| 国产99久久久国产精品免费看| 玉足女爽爽91| 精品国一区二区三区| 91一区二区在线| 男人操女人的视频在线观看欧美 | 天天综合天天综合色| www成人在线观看| 91在线播放网址| 麻豆91在线观看| 亚洲欧美成人一区二区三区| 日韩欧美一级在线播放| 国产天堂亚洲国产碰碰| 日本黄色一区二区| 黑人精品欧美一区二区蜜桃| 亚洲另类一区二区| 久久噜噜亚洲综合| 欧美亚洲一区二区在线| 国产精品一区二区不卡| 亚洲第一精品在线| 国产精品国产三级国产三级人妇| 欧美日韩日本视频| 成人精品免费看| 蜜桃视频第一区免费观看| 亚洲品质自拍视频| www一区二区| 欧美剧在线免费观看网站| jvid福利写真一区二区三区| 老司机精品视频线观看86| 一区二区三区四区精品在线视频| 久久久精品综合| 日韩视频在线永久播放| 欧美性猛片xxxx免费看久爱 | 亚洲精品一区二区三区福利| 在线观看亚洲a| thepron国产精品| 国产一区二区伦理片| 爽爽淫人综合网网站| ...中文天堂在线一区| 欧美成人性战久久| 欧美精品第1页| 在线欧美日韩国产| 不卡大黄网站免费看| 国产真实精品久久二三区| 日韩影视精彩在线| 一区二区三区四区蜜桃 | 国精产品一区一区三区mba视频 | 国产精品久久久久影视| 精品日产卡一卡二卡麻豆| 欧美精品自拍偷拍| 在线观看日韩毛片| 一本色道久久综合亚洲91| 国产成人精品影院| 国产精品一品二品| 国产麻豆视频一区二区| 久久99精品国产麻豆不卡| 欧美aⅴ一区二区三区视频| 日韩电影在线观看电影| 亚洲成人综合网站| 亚洲丶国产丶欧美一区二区三区| 一区二区三区在线免费观看 |