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

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

?? usbhidio.lst

?? VB編寫的USB源碼
?? LST
?? 第 1 頁 / 共 5 頁
字號:
00F4 20    [04]      nop
00F5 80 F0 [05]      jmp suspendReset
00F7            
00F7            BusReset:
00F7            ;Clear all reset bits.
00F7            ;Set bit 0 (the run bit).
00F7 19 01 [04]      mov A, RunBit
00F9 2A FF [05]      iowr Status_Control
00FB            ;Set up for enumeration (Endpoint 0 and 1-millisecond interrupts enabled)
00FB 19 0C [04]      mov A, ENUMERATE_MASK
00FD 31 20 [05]      mov [interrupt_mask],A
00FF 1F    [04]         XPAGE
0100 2A 20 [05]      iowr Global_Interrupt
0102            
0102            wait:
0102            ;Wait until configured.
0102 29 11 [05]      iord USB_EP1_TX_Config
0104 16 00 [04]      cmp A, 0
0106            ;Clear the watchdog timer
0106 2A 21 [05]      iowr Watchdog
0108            ;If not configured, continue to wait.
0108 A1 02 [05]      jz wait     
010A            ;When configured, initialize loop_temp.
010A            ;Loop_temp adds a delay in the start of transmission of data.
010A            ;The chip will respond to the first IN packet no sooner than 
010A            ;230 milliseconds after enumeration is complete.
010A            ;The delay was included in Cypress' joystick code to prevents problems 
010A            ;that occurred when power cycled off and on or the joystick was plugged
010A            ;in before the host powered up.
010A            ;I've left it in because it does no harm and 
010A            ;other hardware might have similar behavior.
010A            ;During the delay, the chip will send a NAK in response to any IN packet.
010A 19 FF [04]      mov A, 0ffh
010C 31 37 [05]      mov [loop_temp], A
010E            
010E            ;Enable endpoint 1
010E 29 11 [05]      iord USB_EP1_TX_Config
0110 0D 92 [04]      or A, 92h
0112 2A 11 [05]      iowr USB_EP1_TX_Config
0114            
0114            ;======================================================================
0114            ; The main program loop.
0114            ;======================================================================
0114            
0114            main:
0114            ;Find out if the loop_temp delay has timed out.
0114            ;Loop_temp =0 if not timed out, FFh if timed out.
0114 1A 37 [06]      mov A, [loop_temp]
0116 16 0A [04]      cmp A, 0Ah
0118            ;If no, don't enable transmitting.
0118 D1 1E [05]      jnc no_set
011A            ;If yes, enable transmitting.
011A 19 01 [04]      mov A, 01h
011C 31 32 [05]      mov [start_send], A
011E            no_set:
011E            ;Clear the watchdog timer.
011E            ;This has to be done at least once every 8 milliseconds!
011E 2A 21 [05]      iowr Watchdog
0120 29 00 [05]      iord Port0_Data
0122            nochange:
0122 81 14 [05]      jmp main
0124            
0124            ;----------------------------------------------------------------------
0124            ;The endpoint 0 ISR supports the control endpoint.
0124            ;This code enumerates and configures the hardware.
0124            ;It also responds to Set Report requests that receive data from the host.
0124            ;----------------------------------------------------------------------
0124            
0124            USB_EP0_ISR:
0124 2D    [05]      push A
0125 29 14 [05]      iord USB_EP0_RX_Status
0127            ;Has a Setup packet been received?
0127 10 01 [04]      and A, 01h
0129            ;If no, find out if it's an OUT packet.
0129 A1 3D [05]      jz check_for_out_packet
012B            ;If yes, handle it.
012B            ;Disable endpoint 0 interrupts.
012B 1A 20 [06]      mov A,[interrupt_mask]
012D 10 F7 [04]      and A, 0F7h
012F 31 20 [05]      mov [interrupt_mask], A
0131 2A 20 [05]      iowr Global_Interrupt
0133            ;Find out what the Setup packet contains and handle the request.
0133 91 83 [10]       call StageOne
0135            ;Re-enable Endpoint 0 interrupts.
0135 1A 20 [06]      mov A, [interrupt_mask]
0137 0D 08 [04]      or A, 08h
0139 31 20 [05]      mov [interrupt_mask], A
013B 81 7B [05]      jmp done_with_packet
013D            
013D            check_for_out_packet:
013D 29 14 [05]      iord USB_EP0_RX_Status
013F            ;Is it an OUT packet?
013F 10 02 [04]      and A, 02h
0141            ;If no, ignore it.
0141 A1 7B [05]      jz done_with_packet
0143            ;If yes, process the received data.
0143            ;Disable Endpoint 0 interrupts.
0143 1A 20 [06]      mov A,[interrupt_mask]
0145 10 F7 [04]      and A, 0F7h
0147 31 20 [05]      mov [interrupt_mask], A
0149 2A 20 [05]      iowr Global_Interrupt
014B            
014B            ;For debugging: set Port 0, bit 1 to show that we're here.
014B 29 00 [05]     iord Port0_Data
014D 0D 02 [04]     or a, 2
014F 2A 00 [05]     iowr Port0_Data
0151            
0151            ;Read the first byte in the buffer
0151 1A 70 [06]      mov a, [Endpoint_0]
0153            ;For debugging: if the first byte =12h, bring Port 0, bit 0 high
0153 16 12 [04]       cmp a, 12h
0155 B1 5D [05]       jnz not_a_match
0157 29 00 [05]       iord Port0_Data
0159 0D 04 [04]       or a, 4
015B 2A 00 [05]       iowr Port0_Data
015D            
015D            not_a_match:
015D            
015D            ;For debugging, add 1 to each byte read
015D            ;and copy the bytes to RAM.
015D            ;These bytes will be sent back to the host.
015D            
015D 2E    [05]       push X
015E                  ;data_count holds the number of bytes left to read.
015E                  ;X holds the index of the address to read
015E                  ;and the index of the address to store the received data.
015E                  ;Initialize the X register.
015E 1C 00 [04]       mov X, 0
0160                  
0160                  Get_Received_Data:
0160                  ;Find out if there are any bytes to read.
0160 19 00 [04]       mov A, 0
0162 17 28 [06]       cmp A, [data_count]
0164                  ;Jump if nothing to read.
0164 A1 78 [05]       jz DoneWithReceivedData
0166            
0166                  ;Get a byte.
0166 1B 70 [07]       mov A, [X + Endpoint_0]
0168                  ;For debugging, increment the received value.
0168                  ;(Endpoint 1 will send it back to the host.)
0168                  ;If the value is 255, reset to 0.
0168                  ;Otherwise increment it.
0168 16 FF [04]       cmp A, 255
016A A1 6F [05]       jz ResetToZero
016C 21    [04]       inc A
016D 81 71 [05]       jmp NewValueSet
016F                  ResetToZero:
016F 19 00 [04]       mov A, 0
0171                  NewValueSet:
0171                  ;Save the value.
0171 32 38 [06]       mov [X + Data_Byte0], A
0173                  ;Decrement the number of bytes to read.
0173 27 28 [07]       dec [data_count]
0175                  ;Increment the address to read.
0175 22    [04]       inc X
0176                  ;Do another
0176 81 60 [05]       jmp Get_Received_Data
0178            
0178                  DoneWithReceivedData:
0178 2C    [04]       pop X
0179            
0179            ;For debugging, set Port 0 to match the value written
0179            ;IN transfers can read this value back.
0179            ;     iowr Port0_Data
0179            
0179            ;Handshake by sending a 0-byte data packet.
0179 93 79 [10] call Send0ByteDataPacket
017B            
017B            done_with_packet:
017B            ;Re-enable Endpoint 0 interrupts.
017B 1A 20 [06]      mov A,[interrupt_mask]
017D 0D 08 [04]      or A, 08h
017F 31 20 [05]      mov [interrupt_mask], A
0181 1E 20 [13]      ipret Global_Interrupt
0183            
0183            ;========================================================================
0183            ;Control transfers
0183            ;========================================================================
0183            
0183            ;------------------------------------------------------------------------
0183            ;Control transfer, stage one.
0183            ;Find out whether the request is a standard device or HID request,
0183            ;the direction of data transfer, 
0183            ;and whether the request is to a device, interface, or endpoint.
0183            ;(from Table 9.2 in the USB spec)
0183            ;------------------------------------------------------------------------
0183            
0183            StageOne:
0183            ;Clear the setup flag
0183 19 00 [04]      mov A, 00h
0185 2A 14 [05]      iowr USB_EP0_RX_Status
0187            ;Set the StatusOuts bit to cause auto-handshake after receiving a data packet.
0187 19 08 [04]      mov A, 8
0189 2A 13 [05]      iowr USB_Status_Control
018B            ;bmRequestType contains the request.
018B 1A 70 [06]       mov A, [bmRequestType]
018D            
018D            ;Standard device requests. From the USB spec.
018D            ; host to device requests
018D 16 00 [04]         cmp A, 00h
018F A1 B2 [05]         jz RequestType00                 ; bmRequestType = 00000000 device
0191            ;       cmp A, 01h                       *** not required ***  
0191            ;       jz RequestType01                 ; bmRequestType = 00000001 interface
0191 16 02 [04]         cmp A, 02h              
0193 A1 C6 [05]         jz RequestType02                 ; bmRequestType = 00000010 endpoint
0195 16 80 [04]         cmp A, 80h             
0197            ; device to host requests
0197 A1 D2 [05]         jz RequestType80                 ; bmRequestType = 10000000 device
0199 16 81 [04]         cmp A, 81h
019B A1 E2 [05]         jz RequestType81                 ; bmRequestType = 10000001 interface
019D 16 82 [04]         cmp A, 82h
019F A1 EE [05]         jz RequestType82                 ; bmRequestType = 10000010 endpoint
01A1            
01A1            ;HID-class device requests. From the HID spec
01A1            ; host to device requests
01A1 16 21 [04]         cmp A, 21h
01A3 A1 FA [05]         jz RequestType21                 ; bmRequestType = 00100001 interface
01A5 16 22 [04]         cmp A, 22h                       ; *** not in HID spec ***
01A7 A2 0C [05]         jz RequestType22                 ; bmRequestType = 00100010 endpoint
01A9            ; device to host requests
01A9 16 A1 [04]         cmp A, A1h
01AB A2 14 [05]         jz RequestTypeA1                 ; bmRequestType = 10100001 interface
01AD            
01AD            ; Stall unsupported requests
01AD            SendStall:
01AD 19 A0 [04]       mov A, A0h
01AF 2A 10 [05]      iowr USB_EP0_TX_Config
01B1 3F    [08]       ret
01B2            
01B2            ;----------------------------------------------------------------------
01B2            ;Control transfer, stage two
01B2            ;Find out which request it is.
01B2            ;----------------------------------------------------------------------
01B2            
01B2            ;Host to device with device as recipient
01B2            RequestType00:
01B2            
01B2            ;The Remote Wakeup feature is disabled on reset.
01B2 1A 71 [06]      mov A, [bRequest]     ; load bRequest
01B4            ; Clear Feature                      bRequest = 1
01B4 16 01 [04]      cmp A, clear_feature
01B6 A2 24 [05]      jz ClearRemoteWakeup 
01B8            ; Set Feature                     bRequest = 3
01B8 16 03 [04]      cmp A, set_feature
01BA A2 31 [05]      jz SetRemoteWakeup
01BC            
01BC            ; Set the device address to a non-zero value.
01BC            ; Set Address                     bRequest = 5
01BC 16 05 [04]      cmp A, set_address
01BE A2 3E [05]      jz SetAddress
01C0            
01C0            ; Set Descriptor is optional.
01C0            ; Set Descriptor                bRequest = 7    *** not supported ***
01C0            
01C0            ;If wValue is zero, the device is not configured.
01C0            ;The only other legal value for this firmware is 1.
01C0            ;Set Configuration           bRequest = 9
01C0 16 09 [04]     cmp A, set_configuration
01C2 A2 45 [05]     jz SetConfiguration
01C4            
01C4            ;Stall unsupported requests.
01C4 81 AD [05]     jmp SendStall
01C6            
01C6            
01C6            ;Host to device with interface as recipient    *** not required ***
01C6            ; RequestType01:
01C6            ;        mov A, [bRequest]       ; load bRequest
01C6            
01C6            ; There are no interface features defined in the spec.
01C6            ; Clear Feature                 bRequest = 1    *** not supported ***
01C6            ; Set Feature                   bRequest = 3    *** not supported ***
01C6            
01C6            ; Set Interface is optional.
01C6            ; Set Interface                 bRequest = 11   *** not supported ***
01C6            

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美视频一二三区| 成人午夜在线播放| 日韩中文字幕av电影| 亚洲电影一区二区| 亚洲午夜私人影院| 亚洲成人av电影在线| 亚洲一二三专区| 性欧美大战久久久久久久久| 亚洲国产精品精华液网站| 亚洲一区二区欧美| 免费在线观看不卡| 国内久久精品视频| 9色porny自拍视频一区二区| 色婷婷av一区二区| 欧美剧情电影在线观看完整版免费励志电影 | 中文字幕一区二区三区四区| 国产精品青草久久| 亚洲乱码国产乱码精品精的特点 | 国产曰批免费观看久久久| 麻豆国产欧美日韩综合精品二区 | 精品一区二区免费在线观看| 国产一区在线精品| 91丝袜美腿高跟国产极品老师| 99国产精品久久久久| 欧美亚洲一区二区三区四区| 欧美日韩日日摸| 精品国产伦一区二区三区观看方式 | 亚洲视频在线一区| 青青草97国产精品免费观看 | 亚洲高清三级视频| 久久av老司机精品网站导航| 国产91丝袜在线观看| 欧美性生活影院| 久久久不卡网国产精品二区 | 欧美伦理视频网站| 久久久久国产成人精品亚洲午夜| 尤物视频一区二区| 国产一区二区三区黄视频| 91一区二区在线| 精品卡一卡二卡三卡四在线| 亚洲欧美偷拍另类a∨色屁股| 全国精品久久少妇| 色狠狠av一区二区三区| 久久久99精品久久| 午夜电影网亚洲视频| 波多野结衣中文字幕一区二区三区| 欧美日韩一区二区三区高清| 中文字幕不卡在线观看| 捆绑调教美女网站视频一区| 91九色最新地址| 欧美高清在线一区二区| 美日韩一区二区| 欧美日韩精品是欧美日韩精品| 国产女同互慰高潮91漫画| 精品中文字幕一区二区小辣椒| 在线精品视频一区二区三四| 国产欧美日韩麻豆91| 国产精品一区二区免费不卡| 欧美一区二区视频观看视频| 亚洲综合男人的天堂| 99精品欧美一区二区蜜桃免费| 久久亚洲精精品中文字幕早川悠里 | 色综合网站在线| 最新中文字幕一区二区三区| 麻豆精品国产传媒mv男同| 欧美美女直播网站| 首页综合国产亚洲丝袜| 欧美视频在线不卡| 亚洲一区二区三区影院| 色综合久久久久综合体| 亚洲精品视频在线看| 91在线国产福利| 亚洲欧美一区二区三区国产精品| 丁香亚洲综合激情啪啪综合| 中文字幕精品三区| 成人免费看视频| 亚洲人吸女人奶水| 91国模大尺度私拍在线视频| 亚洲摸摸操操av| 欧美性色综合网| 亚洲国产精品嫩草影院| 91麻豆精品国产无毒不卡在线观看| 亚洲成人你懂的| 欧美一卡二卡在线观看| 精品影视av免费| 国产欧美日韩麻豆91| 91亚洲国产成人精品一区二区三| 亚洲欧美在线视频观看| 在线日韩国产精品| 丝袜国产日韩另类美女| 日韩一级片网站| 国产精品白丝av| 亚洲品质自拍视频| 欧美群妇大交群中文字幕| 麻豆精品在线视频| 国产精品无人区| 欧美做爰猛烈大尺度电影无法无天| 亚洲国产中文字幕| 久久久99精品久久| 色伊人久久综合中文字幕| 婷婷综合另类小说色区| 亚洲精品一区二区三区四区高清 | 成年人国产精品| 一区二区三区久久| 日韩免费看的电影| 成人av网站免费| 亚洲福利视频三区| 国产精品美女久久久久久久| 欧美性受极品xxxx喷水| 国产一区二区三区在线观看免费| 国产精品高清亚洲| 日韩一级二级三级精品视频| 国产成人av一区二区| 亚洲成在人线在线播放| 国产天堂亚洲国产碰碰| 欧美日韩午夜精品| 国产99久久精品| 全部av―极品视觉盛宴亚洲| 国产精品久久久久7777按摩| 欧美猛男男办公室激情| 99久久精品费精品国产一区二区| 免费高清在线视频一区·| 中文字幕一区二区三| 日韩亚洲欧美中文三级| 欧美伊人久久久久久久久影院| 国产精品一品二品| 日本伊人色综合网| 一区二区在线观看视频| 久久免费偷拍视频| 欧美一区二区三区日韩视频| 色婷婷综合视频在线观看| 国产精品一区专区| 麻豆国产精品官网| 亚洲一区二区视频| 亚洲日本电影在线| 亚洲欧洲99久久| 国产丝袜美腿一区二区三区| 日韩一级片在线播放| 欧美二区三区的天堂| 欧美亚洲一区三区| 色av成人天堂桃色av| 91麻豆国产香蕉久久精品| 成人永久看片免费视频天堂| 久久超碰97中文字幕| 日韩激情视频网站| 日韩高清在线一区| 日韩专区一卡二卡| 午夜精品久久久久久久久| 亚洲午夜一区二区| 亚洲国产精品一区二区久久| 一区二区三区资源| 亚洲精品国产成人久久av盗摄 | 亚洲国产精品一区二区久久恐怖片 | 欧美日韩国产电影| 欧美美女黄视频| 678五月天丁香亚洲综合网| 欧美麻豆精品久久久久久| 欧美体内she精高潮| 欧美午夜免费电影| 欧美精品亚洲二区| 日韩久久久久久| 欧美va在线播放| 精品日韩一区二区三区免费视频| 精品三级在线看| 欧美激情一区二区三区| 亚洲欧洲日韩av| 亚洲黄一区二区三区| 午夜精品影院在线观看| 美女视频免费一区| 成人午夜视频免费看| 一本大道久久a久久综合| 欧美天堂一区二区三区| 欧美另类变人与禽xxxxx| 精品国产污网站| 亚洲欧美日韩在线| 美日韩黄色大片| 成人的网站免费观看| 一本到一区二区三区| 7777精品久久久大香线蕉| 久久久噜噜噜久久人人看| 亚洲免费观看视频| 免费看欧美美女黄的网站| 国产成人精品综合在线观看 | 欧美aaaaaa午夜精品| 国产精品白丝jk黑袜喷水| 日本道免费精品一区二区三区| 91精品国产综合久久精品图片| 久久蜜臀精品av| 亚洲第四色夜色| www.亚洲人| 欧美一区二区黄色| 中文字幕一区二区三区精华液| 午夜精品福利一区二区三区蜜桃| 国产精品系列在线播放| 欧美精品自拍偷拍| 成人免费一区二区三区在线观看| 蜜桃视频一区二区三区在线观看| 97久久超碰国产精品| 26uuuu精品一区二区| 亚洲高清中文字幕|