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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? 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            

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品乱码免费| 波多野结衣一区二区三区| 一区二区三区高清| 免费高清在线一区| 成人av资源在线| 欧美日韩专区在线| 欧美mv日韩mv国产网站app| 中文字幕一区日韩精品欧美| 亚洲图片自拍偷拍| 国产一区欧美二区| 色偷偷成人一区二区三区91 | 欧美激情一区二区三区蜜桃视频| 亚洲欧美一区二区三区久本道91| 欧美a一区二区| 成人激情综合网站| 制服丝袜亚洲精品中文字幕| 国产精品看片你懂得| 日韩制服丝袜先锋影音| 豆国产96在线|亚洲| 91精品国产综合久久久蜜臀粉嫩| 国产精品美女久久福利网站| 天堂va蜜桃一区二区三区| 成人国产精品免费观看视频| 这里只有精品视频在线观看| 亚洲日本电影在线| 韩日欧美一区二区三区| 在线观看日韩毛片| 国产日韩欧美精品一区| 日韩国产精品久久久| 91丨porny丨首页| 久久婷婷国产综合精品青草| 亚洲成年人影院| 97久久精品人人做人人爽50路 | 国产一区二三区好的| 日本久久一区二区| 国产欧美日韩不卡免费| 男女男精品视频| 在线精品视频一区二区三四| 亚洲国产精华液网站w | 久久在线观看免费| 五月天丁香久久| 色视频一区二区| 国产欧美一区二区精品性色 | 精品国产一区二区三区四区四| 一区二区三区中文免费| 成人中文字幕在线| 亚洲精品在线一区二区| 爽爽淫人综合网网站| 欧美这里有精品| 亚洲欧美日韩人成在线播放| 成人小视频免费在线观看| 久久综合狠狠综合久久综合88| 舔着乳尖日韩一区| 欧洲av一区二区嗯嗯嗯啊| 亚洲欧美二区三区| av中文字幕亚洲| 2020日本不卡一区二区视频| 久久99精品视频| 91精品国产综合久久精品app| 亚洲小说欧美激情另类| 91黄色免费版| 亚洲免费观看高清完整版在线 | 欧美精品一区二区三区四区| 日韩在线一区二区| 欧美精品日韩精品| 日韩激情视频网站| 欧美一区二区三区视频在线| 日韩精品视频网| 91精品免费在线| 天天综合色天天综合色h| 欧美丰满美乳xxx高潮www| 午夜免费久久看| 欧美精品在线一区二区三区| 天堂成人免费av电影一区| 欧美精品在线一区二区三区| 日韩vs国产vs欧美| 欧美成人精品3d动漫h| 极品美女销魂一区二区三区| 2023国产精品视频| 东方aⅴ免费观看久久av| 国产精品卡一卡二卡三| 91麻豆精东视频| 亚洲国产欧美在线| 69堂成人精品免费视频| 免费在线看一区| 亚洲精品一区二区三区影院| 国产精品一级在线| 国产日韩影视精品| 成人高清伦理免费影院在线观看| 中文字幕亚洲区| 色婷婷av久久久久久久| 无码av中文一区二区三区桃花岛| 日韩一区二区三区视频| 精品亚洲国内自在自线福利| 欧美精品少妇一区二区三区| 美女一区二区三区| 国产日韩欧美高清| 色中色一区二区| 免费观看成人鲁鲁鲁鲁鲁视频| 久久久精品黄色| 91黄色激情网站| 伦理电影国产精品| 欧美成人性战久久| 高清国产一区二区三区| 亚洲人成网站在线| 欧美妇女性影城| 国产麻豆视频一区二区| 亚洲黄色录像片| 欧美一区二区三区在线电影| 国产精品91xxx| 亚洲亚洲人成综合网络| 久久亚洲一级片| 在线视频综合导航| 国内外精品视频| 一区二区三区不卡视频 | 精品在线播放免费| 国产精品区一区二区三| 欧美日韩精品系列| 国精产品一区一区三区mba桃花| 亚洲天堂2014| 日韩女优av电影| 91在线精品一区二区三区| 日韩福利电影在线| 国产精品理论在线观看| 日韩一区二区精品葵司在线| 国产91在线观看| 日韩国产精品91| 亚洲日本中文字幕区| 精品三级av在线| 欧洲精品中文字幕| 丁香天五香天堂综合| 日本怡春院一区二区| 国产精品国产三级国产aⅴ无密码| 欧美电影在哪看比较好| 成人一道本在线| 免费的国产精品| 亚洲综合在线视频| 国产欧美精品在线观看| 欧美一区在线视频| 日本精品一级二级| 国产传媒日韩欧美成人| 婷婷成人激情在线网| 亚洲欧美日韩国产中文在线| 久久久亚洲欧洲日产国码αv| 欧美精品乱码久久久久久| www.色精品| 国产乱子轮精品视频| 日韩二区在线观看| 亚洲黄色免费网站| 国产精品毛片高清在线完整版| 精品免费视频.| 欧美高清视频在线高清观看mv色露露十八| 99综合电影在线视频| 国产成人免费av在线| 韩国精品久久久| 久久精品国产一区二区三区免费看| 亚洲精品菠萝久久久久久久| 国产精品久久网站| 国产欧美视频在线观看| 欧美大片国产精品| 日韩一二三区视频| 8x8x8国产精品| 欧美日韩中文字幕一区二区| 在线视频国内自拍亚洲视频| 91在线免费播放| 99久久99久久精品免费看蜜桃| 国产成人啪免费观看软件| 激情小说欧美图片| 老司机精品视频导航| 日本不卡一区二区三区高清视频| 亚洲成人资源在线| 天天综合网 天天综合色| 午夜亚洲福利老司机| 亚洲高清视频在线| 亚洲综合一区二区三区| 亚洲综合视频网| 亚洲图片有声小说| 性感美女久久精品| 日韩电影免费在线观看网站| 午夜激情一区二区三区| 日韩精品一级中文字幕精品视频免费观看 | 亚洲国产精品成人久久综合一区| 国产精品久久久久aaaa| 欧美日韩中文一区| 欧美日韩亚洲高清一区二区| 欧美亚洲综合在线| 精品视频一区 二区 三区| 欧洲视频一区二区| 欧美日本一区二区| 欧美一区二区三区四区视频| 制服丝袜成人动漫| 日韩欧美激情一区| 26uuu另类欧美| 国产日韩一级二级三级| 国产精品久久久久久久午夜片| 中文字幕在线不卡| 一区二区三区在线高清| 天天av天天翘天天综合网色鬼国产| 日韩电影免费一区| 韩国成人在线视频|