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

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

?? usbdrvasm16.s

?? avr單片機(jī)usb下載器的制作資料
?? S
?? 第 1 頁 / 共 2 頁
字號:
doReturn:    pop     cnt    pop     x4    pop     x3    pop     x2    pop     x1    pop     shift    pop     bitcntsofError:    pop     YH    pop     YL    out     SREG, YL    pop     YL    reti#if USB_CFG_HAVE_INTRIN_ENDPOINT && USB_CFG_HAVE_INTRIN_ENDPOINT3handleIn3:    lds     cnt, usbTxLen3      ;[43]    sbrc    cnt, 4              ;[45]    rjmp    sendCntAndReti      ;[46] 48 + 16 = 64 until SOP    sts     usbTxLen3, x1       ;[47] x1 == USBPID_NAK from above    ldi     YL, lo8(usbTxBuf3)  ;[49]    ldi     YH, hi8(usbTxBuf3)  ;[50]    rjmp    usbSendAndReti      ;[51] 53 + 12 = 65 until SOP#endif;Setup and Out are followed by a data packet two bit times (16 cycles) after;the end of SE0. The sync code allows up to 40 cycles delay from the start of;the sync pattern until the first bit is sampled. That's a total of 56 cycles.handleSetupOrOut:               ;[34]#if USB_CFG_IMPLEMENT_FN_WRITEOUT   /* if we have data for second OUT endpoint, set usbCurrentTok to -1 */    sbrc    x3, 7               ;[34] skip if endpoint 0    ldi     token, -1           ;[35] indicate that this is endpoint 1 OUT#endif    sts     usbCurrentTok, token;[36]    pop     cnt                 ;[38]    pop     x4                  ;[40]    pop     x3                  ;[42]    pop     x2                  ;[44]    pop     x1                  ;[46]    pop     shift               ;[48]    pop     bitcnt              ;[50]    in      YL, USB_INTR_PENDING;[52]    sbrc    YL, USB_INTR_PENDING_BIT;[53] check whether data is already arriving    rjmp    waitForJ            ;[54] save the pops and pushes -- a new interrupt is aready pending    rjmp    sofError            ;[55] not an error, but it does the pops and reti we wanthandleData:    lds     token, usbCurrentTok;[20]    tst     token               ;[22]    breq    doReturn            ;[23]    lds     x2, usbRxLen        ;[24]    tst     x2                  ;[26]    brne    sendNakAndReti      ;[27]; 2006-03-11: The following two lines fix a problem where the device was not; recognized if usbPoll() was called less frequently than once every 4 ms.    cpi     cnt, 4              ;[28] zero sized data packets are status phase only -- ignore and ack    brmi    sendAckAndReti      ;[29] keep rx buffer clean -- we must not NAK next SETUP    sts     usbRxLen, cnt       ;[30] store received data, swap buffers    sts     usbRxToken, token   ;[32]    lds     x2, usbInputBufOffset;[34] swap buffers    ldi     cnt, USB_BUFSIZE    ;[36]    sub     cnt, x2             ;[37]    sts     usbInputBufOffset, cnt;[38] buffers now swapped    rjmp    sendAckAndReti      ;[40] 42 + 17 = 59 until SOPhandleIn:;We don't send any data as long as the C code has not processed the current;input data and potentially updated the output data. That's more efficient;in terms of code size than clearing the tx buffers when a packet is received.    lds     x1, usbRxLen        ;[30]    cpi     x1, 1               ;[32] negative values are flow control, 0 means "buffer free"    brge    sendNakAndReti      ;[33] unprocessed input packet?    ldi     x1, USBPID_NAK      ;[34] prepare value for usbTxLen#if USB_CFG_HAVE_INTRIN_ENDPOINT    sbrc    x3, 7               ;[35] x3 contains addr + endpoint    rjmp    handleIn1           ;[36]#endif    lds     cnt, usbTxLen       ;[37]    sbrc    cnt, 4              ;[39] all handshake tokens have bit 4 set    rjmp    sendCntAndReti      ;[40] 42 + 16 = 58 until SOP    sts     usbTxLen, x1        ;[41] x1 == USBPID_NAK from above    ldi     YL, lo8(usbTxBuf)   ;[43]    ldi     YH, hi8(usbTxBuf)   ;[44]    rjmp    usbSendAndReti      ;[45] 47 + 12 = 59 until SOP; Comment about when to set usbTxLen to USBPID_NAK:; We should set it back when we receive the ACK from the host. This would; be simple to implement: One static variable which stores whether the last; tx was for endpoint 0 or 1 and a compare in the receiver to distinguish the; ACK. However, we set it back immediately when we send the package,; assuming that no error occurs and the host sends an ACK. We save one byte; RAM this way and avoid potential problems with endless retries. The rest of; the driver assumes error-free transfers anyway.#if USB_CFG_HAVE_INTRIN_ENDPOINT    /* placed here due to relative jump range */handleIn1:                      ;[38]#if USB_CFG_HAVE_INTRIN_ENDPOINT3; 2006-06-10 as suggested by O.Tamura: support second INTR IN / BULK IN endpoint    ldd     x2, y+2             ;[38]    sbrc    x2, 0               ;[40]    rjmp    handleIn3           ;[41]#endif    lds     cnt, usbTxLen1      ;[42]    sbrc    cnt, 4              ;[44] all handshake tokens have bit 4 set    rjmp    sendCntAndReti      ;[45] 47 + 16 = 63 until SOP    sts     usbTxLen1, x1       ;[46] x1 == USBPID_NAK from above    ldi     YL, lo8(usbTxBuf1)  ;[48]    ldi     YH, hi8(usbTxBuf1)  ;[49]    rjmp    usbSendAndReti      ;[50] 52 + 12 + 64 until SOP#endif; USB spec says:; idle = J; J = (D+ = 0), (D- = 1); K = (D+ = 1), (D- = 0); Spec allows 7.5 bit times from EOP to SOP for repliesbitstuffN:    eor     x1, x4          ;[5]    ldi     x2, 0           ;[6]    nop2                    ;[7]    nop                     ;[9]    out     USBOUT, x1      ;[10] <-- out    rjmp    didStuffN       ;[0]    bitstuff6:    eor     x1, x4          ;[4]    ldi     x2, 0           ;[5]    nop2                    ;[6] C is zero (brcc)    rjmp    didStuff6       ;[8]bitstuff7:    eor     x1, x4          ;[3]    ldi     x2, 0           ;[4]    rjmp    didStuff7       ;[5]sendNakAndReti:    ldi     x3, USBPID_NAK  ;[-18]    rjmp    sendX3AndReti   ;[-17]sendAckAndReti:    ldi     cnt, USBPID_ACK ;[-17]sendCntAndReti:    mov     x3, cnt         ;[-16]sendX3AndReti:    ldi     YL, 20          ;[-15] x3==r20 address is 20    ldi     YH, 0           ;[-14]    ldi     cnt, 2          ;[-13];   rjmp    usbSendAndReti      fallthrough;usbSend:;pointer to data in 'Y';number of bytes in 'cnt' -- including sync byte [range 2 ... 12];uses: x1...x4, btcnt, shift, cnt, Y;Numbers in brackets are time since first bit of sync pattern is sent;We don't match the transfer rate exactly (don't insert leap cycles every third;byte) because the spec demands only 1.5% precision anyway.usbSendAndReti:             ; 12 cycles until SOP    in      x2, USBDDR      ;[-12]    ori     x2, USBMASK     ;[-11]    sbi     USBOUT, USBMINUS;[-10] prepare idle state; D+ and D- must have been 0 (no pullups)    in      x1, USBOUT      ;[-8] port mirror for tx loop    out     USBDDR, x2      ;[-7] <- acquire bus; need not init x2 (bitstuff history) because sync starts with 0    ldi     x4, USBMASK     ;[-6] exor mask    ldi     shift, 0x80     ;[-5] sync byte is first byte senttxByteLoop:    ldi     bitcnt, 0x2a    ;[-4] [6] binary 00101010txBitLoop:    sbrs    shift, 0        ;[-3] [7]    eor     x1, x4          ;[-2] [8]    out     USBOUT, x1      ;[-1] [9] <-- out N    ror     shift           ;[0] [10]    ror     x2              ;[1]didStuffN:    cpi     x2, 0xfc        ;[2]    brcc    bitstuffN       ;[3]    lsr     bitcnt          ;[4]    brcc    txBitLoop       ;[5]    brne    txBitLoop       ;[6]    sbrs    shift, 0        ;[7]    eor     x1, x4          ;[8]    ror     shift           ;[9]didStuff6:    out     USBOUT, x1      ;[-1] [10] <-- out 6    ror     x2              ;[0] [11]    cpi     x2, 0xfc        ;[1]    brcc    bitstuff6       ;[2]    sbrs    shift, 0        ;[3]    eor     x1, x4          ;[4]    ror     shift           ;[5]    ror     x2              ;[6]didStuff7:    nop                     ;[7]    nop2                    ;[8]    out     USBOUT, x1      ;[-1][10] <-- out 7    cpi     x2, 0xfc        ;[0] [11]    brcc    bitstuff7       ;[1]    ld      shift, y+       ;[2]    dec     cnt             ;[4]    brne    txByteLoop      ;[4];make SE0:    cbr     x1, USBMASK     ;[7] prepare SE0 [spec says EOP may be 21 to 25 cycles]    lds     x2, usbNewDeviceAddr;[8]    out     USBOUT, x1      ;[10] <-- out SE0 -- from now 2 bits = 22 cycles until bus idle;2006-03-06: moved transfer of new address to usbDeviceAddr from C-Code to asm:;set address only after data packet was sent, not after handshake    subi    YL, 2           ;[0]    sbci    YH, 0           ;[1]    breq    skipAddrAssign  ;[2]    sts     usbDeviceAddr, x2; if not skipped: SE0 is one cycle longerskipAddrAssign:;end of usbDeviceAddress transfer    ldi     x2, 1<<USB_INTR_PENDING_BIT;[4] int0 occurred during TX -- clear pending flag    out     USB_INTR_PENDING, x2;[5]    ori     x1, USBIDLE     ;[6]    in      x2, USBDDR      ;[7]    cbr     x2, USBMASK     ;[8] set both pins to input    mov     x3, x1          ;[9]    cbr     x3, USBMASK     ;[10] configure no pullup on both pins    ldi     x4, 4           ;[11]se0Delay:    dec     x4              ;[12] [15] [18] [21]    brne    se0Delay        ;[13] [16] [19] [22]    out     USBOUT, x1      ;[23] <-- out J (idle) -- end of SE0 (EOP signal)    out     USBDDR, x2      ;[24] <-- release bus now    out     USBOUT, x3      ;[25] <-- ensure no pull-up resistors are active    rjmp    doReturn

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美人伦禁忌dvd放荡欲情| 青青草一区二区三区| 风间由美中文字幕在线看视频国产欧美 | 中文字幕 久热精品 视频在线| 精品亚洲国产成人av制服丝袜| 精品国产一区二区三区忘忧草| 国产主播一区二区| 欧美激情一区二区三区蜜桃视频| 成人精品国产免费网站| 亚洲精品免费在线观看| 欧美日本视频在线| 蜜臀99久久精品久久久久久软件| 欧美一二区视频| 国产高清视频一区| 中文字幕视频一区| 欧美日韩不卡一区| 国产综合色精品一区二区三区| 久久久久久久综合日本| 91亚洲国产成人精品一区二区三| 亚洲激情成人在线| 欧美一区二区三区播放老司机| 国产一区二区三区精品视频| 国产精品免费视频观看| 欧美性猛片aaaaaaa做受| 日韩精品亚洲一区| 国产午夜亚洲精品不卡| 在线观看www91| 久久精品999| 国产精品美女久久久久久| 欧美日韩亚洲不卡| 国产在线播放一区三区四| 亚洲三级在线播放| 日韩精品专区在线影院重磅| 丁香桃色午夜亚洲一区二区三区| 洋洋av久久久久久久一区| 欧美成人性战久久| 在线亚洲人成电影网站色www| 日韩高清在线观看| 亚洲天堂av老司机| 精品国产乱码久久久久久免费| 91在线观看下载| 蜜臀av性久久久久av蜜臀妖精| 亚洲欧洲av另类| 日韩久久免费av| 欧美亚洲免费在线一区| 国产成人综合自拍| 蜜臀va亚洲va欧美va天堂| 亚洲欧美中日韩| 国产亚洲精品精华液| 在线播放国产精品二区一二区四区| 成人免费av网站| 久久精品理论片| 亚洲国产日日夜夜| 国产精品灌醉下药二区| 精品国产三级a在线观看| 欧美三级电影在线观看| bt欧美亚洲午夜电影天堂| 精品亚洲国内自在自线福利| 亚洲第一狼人社区| 亚洲最大色网站| 中文字幕一区日韩精品欧美| 精品成人一区二区三区| 91精品免费观看| 欧美亚洲国产一区在线观看网站 | 天天影视涩香欲综合网| 亚洲欧洲国产日本综合| 亚洲国产精品ⅴa在线观看| 精品区一区二区| 日韩午夜小视频| 6080亚洲精品一区二区| 欧美日韩精品专区| 欧美日精品一区视频| 欧洲激情一区二区| 色老汉一区二区三区| 91蝌蚪porny| 91视频在线观看| 色综合婷婷久久| 91视频一区二区| 91福利精品视频| 欧洲一区在线电影| 在线观看91视频| 在线播放91灌醉迷j高跟美女| 欧美色图片你懂的| 欧美日韩免费不卡视频一区二区三区| 色婷婷综合久久久中文一区二区 | 青娱乐精品在线视频| 五月激情六月综合| 日韩不卡一二三区| 蜜臀精品一区二区三区在线观看| 日本人妖一区二区| 久久99国产精品免费| 国产一区二区三区高清播放| 国产精品一级片在线观看| 国产精品一二三四区| 成人免费av在线| 日本韩国欧美在线| 在线不卡免费av| 欧美成va人片在线观看| 国产亚洲精品aa午夜观看| 国产精品系列在线| 一区二区三区国产精品| 天天做天天摸天天爽国产一区| 日韩中文字幕亚洲一区二区va在线 | 亚洲www啪成人一区二区麻豆| 亚洲制服丝袜一区| 免费观看成人av| 国产精品一区二区久久精品爱涩| 成人高清av在线| 欧美日韩久久久一区| 欧美v亚洲v综合ⅴ国产v| 久久男人中文字幕资源站| 国产精品国产自产拍高清av王其| 一区二区欧美视频| 久久99国产精品尤物| 成人激情图片网| 欧美日韩免费视频| 国产亚洲一区二区在线观看| 亚洲乱码精品一二三四区日韩在线| 亚洲国产中文字幕在线视频综合 | 亚洲精品国产精华液| 日韩精品电影一区亚洲| 国产精品亚洲午夜一区二区三区| 色狠狠一区二区三区香蕉| 久久婷婷综合激情| 亚洲图片另类小说| 蜜桃视频在线观看一区| 91亚洲精品乱码久久久久久蜜桃 | 久久精品日韩一区二区三区| 亚洲蜜臀av乱码久久精品| 丝袜亚洲精品中文字幕一区| 国产91高潮流白浆在线麻豆| 欧美午夜精品久久久久久孕妇| 久久人人爽爽爽人久久久| 亚洲国产综合色| 99免费精品在线| 欧美精品一区二区在线播放 | 欧美电影免费观看高清完整版在线| 中文字幕精品—区二区四季| 日韩二区三区在线观看| 91小宝寻花一区二区三区| 欧美精品一区二区精品网| 亚洲成人动漫在线观看| 99久久精品国产毛片| 欧美精品一区二| 日韩国产欧美在线观看| 色播五月激情综合网| 久久女同性恋中文字幕| 免费在线观看成人| 欧美亚洲自拍偷拍| 亚洲女与黑人做爰| 高清av一区二区| 久久综合精品国产一区二区三区| 日韩精品成人一区二区三区| 欧美自拍偷拍午夜视频| 国产精品久久久久久亚洲毛片| 精品在线你懂的| 日韩一级视频免费观看在线| 亚洲bdsm女犯bdsm网站| 色噜噜狠狠色综合中国| 最新国产の精品合集bt伙计| 国产成人8x视频一区二区 | 韩国一区二区在线观看| 777午夜精品免费视频| 亚洲综合区在线| 欧美影院一区二区| 亚洲综合久久久久| 91福利社在线观看| 亚洲午夜一二三区视频| 色综合久久88色综合天天6| 亚洲日本成人在线观看| 色综合久久99| 亚洲美女少妇撒尿| 在线一区二区三区| 亚洲成av人影院在线观看网| 欧美亚洲综合网| 亚洲gay无套男同| 欧美一二三四区在线| 激情综合网激情| 国产日产亚洲精品系列| 国产sm精品调教视频网站| 国产欧美精品一区aⅴ影院| 国产超碰在线一区| 亚洲丝袜另类动漫二区| 色婷婷av一区| 天堂久久久久va久久久久| 日韩一区二区免费在线电影| 黄网站免费久久| 欧美激情在线一区二区| 91麻豆精品一区二区三区| 亚洲综合图片区| 在线播放欧美女士性生活| 黄一区二区三区| 中文在线资源观看网站视频免费不卡 | 欧美一区二区人人喊爽| 国产专区欧美精品| 国产精品高潮久久久久无| 欧美色倩网站大全免费| 六月丁香综合在线视频| 国产女同互慰高潮91漫画| 色网综合在线观看|