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

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

?? usbdrvasm12.s

?? AVR_Meag8單片機控制三基色的LED
?? S
?? 第 1 頁 / 共 2 頁
字號:
/* Name: usbdrvasm12.S * Project: AVR USB driver * Author: Christian Starkjohann * Creation Date: 2004-12-29 * Tabsize: 4 * Copyright: (c) 2007 by OBJECTIVE DEVELOPMENT Software GmbH * License: GNU GPL v2 (see License.txt) or proprietary (CommercialLicense.txt) * This Revision: $Id: usbdrvasm12.S 353 2007-06-21 19:05:08Z cs $ *//* Do not link this file! Link usbdrvasm.S instead, which includes the * appropriate implementation! *//*General Description:This file is the 12 MHz version of the asssembler part of the USB driver. Itrequires a 12 MHz crystal (not a ceramic resonator and not a calibrated RCoscillator).See usbdrv.h for a description of the entire driver.Since almost all of this code is timing critical, don't change unless youreally know what you are doing! Many parts require not only a maximum numberof CPU cycles, but even an exact number of cycles!Timing constraints according to spec (in bit times):timing subject                                      min max    CPUcycles---------------------------------------------------------------------------EOP of OUT/SETUP to sync pattern of DATA0 (both rx) 2   16     16-128EOP of IN to sync pattern of DATA0 (rx, then tx)    2   7.5    16-60DATAx (rx) to ACK/NAK/STALL (tx)                    2   7.5    16-60*/;Software-receiver engine. Strict timing! Don't change unless you can preserve timing!;interrupt response time: 4 cycles + insn running = 7 max if interrupts always enabled;max allowable interrupt latency: 34 cycles -> max 25 cycles interrupt disable;max stack usage: [ret(2), YL, SREG, YH, shift, x1, x2, x3, cnt, x4] = 11 bytes;Numbers in brackets are maximum cycles since SOF.SIG_INTERRUPT0:;order of registers pushed: YL, SREG [sofError], YH, shift, x1, x2, x3, cnt    push    YL              ;2 [35] push only what is necessary to sync with edge ASAP    in      YL, SREG        ;1 [37]    push    YL              ;2 [39];----------------------------------------------------------------------------; Synchronize with sync pattern:;----------------------------------------------------------------------------;sync byte (D-) pattern LSb to MSb: 01010100 [1 = idle = J, 0 = K];sync up with J to K edge during sync pattern -- use fastest possible loops;first part has no timeout because it waits for IDLE or SE1 (== disconnected)waitForJ:    sbis    USBIN, USBMINUS ;1 [40] wait for D- == 1    rjmp    waitForJ        ;2waitForK:;The following code results in a sampling window of 1/4 bit which meets the spec.    sbis    USBIN, USBMINUS    rjmp    foundK    sbis    USBIN, USBMINUS    rjmp    foundK    sbis    USBIN, USBMINUS    rjmp    foundK    sbis    USBIN, USBMINUS    rjmp    foundK    sbis    USBIN, USBMINUS    rjmp    foundK    rjmp    sofErrorfoundK:;{3, 5} after falling D- edge, average delay: 4 cycles [we want 4 for center sampling];we have 1 bit time for setup purposes, then sample again. Numbers in brackets;are cycles from center of first sync (double K) bit after the instruction    push    YH                  ;2 [2]    lds     YL, usbInputBufOffset;2 [4]    clr     YH                  ;1 [5]    subi    YL, lo8(-(usbRxBuf));1 [6]    sbci    YH, hi8(-(usbRxBuf));1 [7]    sbis    USBIN, USBMINUS ;1 [8] we want two bits K [sample 1 cycle too early]    rjmp    haveTwoBitsK    ;2 [10]    pop     YH              ;2 [11] undo the push from before    rjmp    waitForK        ;2 [13] this was not the end of sync, retryhaveTwoBitsK:;----------------------------------------------------------------------------; push more registers and initialize values while we sample the first bits:;----------------------------------------------------------------------------    push    shift           ;2 [16]    push    x1              ;2 [12]    push    x2              ;2 [14]    in      x1, USBIN       ;1 [17] <-- sample bit 0    ldi     shift, 0xff     ;1 [18]    bst     x1, USBMINUS    ;1 [19]    bld     shift, 0        ;1 [20]    push    x3              ;2 [22]    push    cnt             ;2 [24]        in      x2, USBIN       ;1 [25] <-- sample bit 1    ser     x3              ;1 [26] [inserted init instruction]    eor     x1, x2          ;1 [27]    bst     x1, USBMINUS    ;1 [28]    bld     shift, 1        ;1 [29]    ldi     cnt, USB_BUFSIZE;1 [30] [inserted init instruction]    rjmp    rxbit2          ;2 [32];----------------------------------------------------------------------------; Receiver loop (numbers in brackets are cycles within byte after instr);----------------------------------------------------------------------------unstuff0:               ;1 (branch taken)    andi    x3, ~0x01   ;1 [15]    mov     x1, x2      ;1 [16] x2 contains last sampled (stuffed) bit    in      x2, USBIN   ;1 [17] <-- sample bit 1 again    ori     shift, 0x01 ;1 [18]    rjmp    didUnstuff0 ;2 [20]unstuff1:               ;1 (branch taken)    mov     x2, x1      ;1 [21] x1 contains last sampled (stuffed) bit    andi    x3, ~0x02   ;1 [22]    ori     shift, 0x02 ;1 [23]    nop                 ;1 [24]    in      x1, USBIN   ;1 [25] <-- sample bit 2 again    rjmp    didUnstuff1 ;2 [27]unstuff2:               ;1 (branch taken)    andi    x3, ~0x04   ;1 [29]    ori     shift, 0x04 ;1 [30]    mov     x1, x2      ;1 [31] x2 contains last sampled (stuffed) bit    nop                 ;1 [32]    in      x2, USBIN   ;1 [33] <-- sample bit 3    rjmp    didUnstuff2 ;2 [35]unstuff3:               ;1 (branch taken)    in      x2, USBIN   ;1 [34] <-- sample stuffed bit 3 [one cycle too late]    andi    x3, ~0x08   ;1 [35]    ori     shift, 0x08 ;1 [36]    rjmp    didUnstuff3 ;2 [38]unstuff4:               ;1 (branch taken)    andi    x3, ~0x10   ;1 [40]    in      x1, USBIN   ;1 [41] <-- sample stuffed bit 4    ori     shift, 0x10 ;1 [42]    rjmp    didUnstuff4 ;2 [44]unstuff5:               ;1 (branch taken)    andi    x3, ~0x20   ;1 [48]    in      x2, USBIN   ;1 [49] <-- sample stuffed bit 5    ori     shift, 0x20 ;1 [50]    rjmp    didUnstuff5 ;2 [52]unstuff6:               ;1 (branch taken)    andi    x3, ~0x40   ;1 [56]    in      x1, USBIN   ;1 [57] <-- sample stuffed bit 6    ori     shift, 0x40 ;1 [58]    rjmp    didUnstuff6 ;2 [60]; extra jobs done during bit interval:; bit 0:    store, clear [SE0 is unreliable here due to bit dribbling in hubs]; bit 1:    se0 check; bit 2:    overflow check; bit 3:    recovery from delay [bit 0 tasks took too long]; bit 4:    none; bit 5:    none; bit 6:    none; bit 7:    jump, eorrxLoop:    eor     x3, shift   ;1 [0] reconstruct: x3 is 0 at bit locations we changed, 1 at others    in      x1, USBIN   ;1 [1] <-- sample bit 0    st      y+, x3      ;2 [3] store data    ser     x3          ;1 [4]    nop                 ;1 [5]    eor     x2, x1      ;1 [6]    bst     x2, USBMINUS;1 [7]    bld     shift, 0    ;1 [8]    in      x2, USBIN   ;1 [9] <-- sample bit 1 (or possibly bit 0 stuffed)    andi    x2, USBMASK ;1 [10]    breq    se0         ;1 [11] SE0 check for bit 1    andi    shift, 0xf9 ;1 [12]didUnstuff0:    breq    unstuff0    ;1 [13]    eor     x1, x2      ;1 [14]    bst     x1, USBMINUS;1 [15]    bld     shift, 1    ;1 [16]rxbit2:    in      x1, USBIN   ;1 [17] <-- sample bit 2 (or possibly bit 1 stuffed)    andi    shift, 0xf3 ;1 [18]    breq    unstuff1    ;1 [19] do remaining work for bit 1didUnstuff1:    subi    cnt, 1      ;1 [20]    brcs    overflow    ;1 [21] loop control    eor     x2, x1      ;1 [22]    bst     x2, USBMINUS;1 [23]    bld     shift, 2    ;1 [24]    in      x2, USBIN   ;1 [25] <-- sample bit 3 (or possibly bit 2 stuffed)    andi    shift, 0xe7 ;1 [26]    breq    unstuff2    ;1 [27]didUnstuff2:    eor     x1, x2      ;1 [28]    bst     x1, USBMINUS;1 [29]    bld     shift, 3    ;1 [30]didUnstuff3:    andi    shift, 0xcf ;1 [31]    breq    unstuff3    ;1 [32]    in      x1, USBIN   ;1 [33] <-- sample bit 4    eor     x2, x1      ;1 [34]    bst     x2, USBMINUS;1 [35]    bld     shift, 4    ;1 [36]didUnstuff4:    andi    shift, 0x9f ;1 [37]    breq    unstuff4    ;1 [38]    nop2                ;2 [40]    in      x2, USBIN   ;1 [41] <-- sample bit 5    eor     x1, x2      ;1 [42]    bst     x1, USBMINUS;1 [43]    bld     shift, 5    ;1 [44]didUnstuff5:    andi    shift, 0x3f ;1 [45]    breq    unstuff5    ;1 [46]    nop2                ;2 [48]    in      x1, USBIN   ;1 [49] <-- sample bit 6    eor     x2, x1      ;1 [50]    bst     x2, USBMINUS;1 [51]    bld     shift, 6    ;1 [52]didUnstuff6:    cpi     shift, 0x02 ;1 [53]    brlo    unstuff6    ;1 [54]    nop2                ;2 [56]    in      x2, USBIN   ;1 [57] <-- sample bit 7    eor     x1, x2      ;1 [58]    bst     x1, USBMINUS;1 [59]    bld     shift, 7    ;1 [60]didUnstuff7:    cpi     shift, 0x04 ;1 [61]    brsh    rxLoop      ;2 [63] loop controlunstuff7:    andi    x3, ~0x80   ;1 [63]    ori     shift, 0x80 ;1 [64]    in      x2, USBIN   ;1 [65] <-- sample stuffed bit 7    nop                 ;1 [66]    rjmp    didUnstuff7 ;2 [68];----------------------------------------------------------------------------; Processing of received packet (numbers in brackets are cycles after end of SE0);----------------------------------------------------------------------------;This is the only non-error exit point for the software receiver loop;we don't check any CRCs here because there is no time left.#define token   x1se0:                            ;  [0]    subi    cnt, USB_BUFSIZE    ;1 [1]    neg     cnt                 ;1 [2]    cpi     cnt, 3              ;1 [3]    ldi     x2, 1<<USB_INTR_PENDING_BIT ;1 [4]    out     USB_INTR_PENDING, x2;1 [5] clear pending intr and check flag later. SE0 should be over.    brlo    doReturn            ;1 [6] this is probably an ACK, NAK or similar packet    sub     YL, cnt             ;1 [7]    sbci    YH, 0               ;1 [8]    ld      token, y            ;2 [10]    cpi     token, USBPID_DATA0 ;1 [11]    breq    handleData          ;1 [12]    cpi     token, USBPID_DATA1 ;1 [13]    breq    handleData          ;1 [14]    ldd     x2, y+1             ;2 [16] ADDR and 1 bit endpoint number    mov     x3, x2              ;1 [17] store for endpoint number    andi    x2, 0x7f            ;1 [18] x2 is now ADDR    lds     shift, usbDeviceAddr;2 [20]    cp      x2, shift           ;1 [21]overflow:                       ; This is a hack: brcs overflow will never have Z flag set    brne    ignorePacket        ;1 [22] packet for different address    cpi     token, USBPID_IN    ;1 [23]    breq    handleIn            ;1 [24]    cpi     token, USBPID_SETUP ;1 [25]    breq    handleSetupOrOut    ;1 [26]    cpi     token, USBPID_OUT   ;1 [27]    breq    handleSetupOrOut    ;1 [28];   rjmp    ignorePacket        ;fallthrough, should not happen anyway.ignorePacket:    clr     shift    sts     usbCurrentTok, shift

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩三级在线免费观看| 欧美高清dvd| 免费成人性网站| 亚洲欧洲av一区二区三区久久| 欧美女孩性生活视频| 国产成人av一区二区三区在线 | 久久久久久久久久久99999| 一本色道a无线码一区v| 国模冰冰炮一区二区| 亚洲一区二区成人在线观看| 2023国产一二三区日本精品2022| 在线精品视频免费观看| 国产91丝袜在线播放九色| 日韩专区在线视频| 亚洲情趣在线观看| 久久精品人人爽人人爽| 日韩一级免费观看| 欧美日韩一级二级| 99v久久综合狠狠综合久久| 国产在线播放一区| 免费欧美在线视频| 亚洲成人免费观看| 一区二区久久久| 亚洲私人影院在线观看| 欧美激情综合网| 日韩免费一区二区三区在线播放| 欧美午夜理伦三级在线观看| 色综合久久99| 91片在线免费观看| 99精品视频一区二区| 国产91综合一区在线观看| 国产在线国偷精品产拍免费yy| 日本强好片久久久久久aaa| 亚洲一区中文在线| 亚洲一卡二卡三卡四卡无卡久久| 亚洲色图.com| 亚洲美女在线国产| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 久久精品夜色噜噜亚洲aⅴ| 日韩欧美一区二区视频| 日韩欧美黄色影院| 日韩亚洲欧美成人一区| 欧美一级高清大全免费观看| 91精品国产综合久久久久| 91麻豆精品国产自产在线| 9191久久久久久久久久久| 6080国产精品一区二区| 日韩一区二区精品在线观看| 欧美岛国在线观看| 精品久久久久久久久久久久久久久 | 中文欧美字幕免费| 中文幕一区二区三区久久蜜桃| 亚洲国产精品t66y| 国产精品美女久久久久久久久| 国产精品国模大尺度视频| 中文字幕制服丝袜一区二区三区 | 一区二区三区美女视频| 亚洲午夜精品网| 日韩avvvv在线播放| 精品亚洲porn| 成人激情黄色小说| 91福利精品第一导航| 欧美群妇大交群的观看方式| 日韩欧美自拍偷拍| 国产三级三级三级精品8ⅰ区| 中文幕一区二区三区久久蜜桃| 亚洲女与黑人做爰| 天天色图综合网| 狠狠狠色丁香婷婷综合久久五月| 成人午夜av影视| 欧美性受xxxx| 精品国产区一区| 亚洲欧洲美洲综合色网| 亚洲午夜激情av| 色欧美日韩亚洲| 日韩视频免费观看高清完整版| 久久久久久久久久久电影| 亚洲视频 欧洲视频| 日产国产欧美视频一区精品| 国产高清在线精品| 在线观看91精品国产入口| 欧美成人三级在线| 一区精品在线播放| 免费的成人av| 99久久精品国产毛片| 精品视频一区二区不卡| 久久久电影一区二区三区| 亚洲综合在线第一页| 国产在线一区二区综合免费视频| 91蝌蚪porny| 精品久久人人做人人爽| 一区二区三区四区亚洲| 国产一区二区免费在线| 在线观看日韩高清av| 久久久一区二区三区| 亚洲精品欧美激情| 国产在线乱码一区二区三区| 在线观看视频一区| 国产日产亚洲精品系列| 视频一区二区三区在线| 91影院在线免费观看| 精品乱人伦小说| 午夜婷婷国产麻豆精品| 成人av网址在线观看| 精品日韩99亚洲| 天天av天天翘天天综合网 | 精品国产百合女同互慰| 亚洲在线视频一区| 成人午夜视频在线观看| 日韩一区二区免费在线观看| 亚洲精品欧美激情| 成人a区在线观看| 久久久欧美精品sm网站| 麻豆91在线播放| 欧美日韩三级视频| 亚洲欧美一区二区三区极速播放| 国产主播一区二区三区| 日韩美女视频在线| 天堂在线亚洲视频| 欧美偷拍一区二区| 亚洲免费av高清| 91在线视频网址| 国产精品久久777777| 国产乱码精品一区二区三区av| 日韩欧美一级片| 日韩中文字幕91| 欧美视频自拍偷拍| 亚洲色图在线看| 99综合电影在线视频| 国产精品久久久久久久浪潮网站| 国产高清精品在线| 久久亚洲捆绑美女| 国产麻豆午夜三级精品| 日韩欧美国产一区在线观看| 天天色天天爱天天射综合| 欧美日韩在线三级| 图片区小说区国产精品视频| 91成人国产精品| 亚洲无线码一区二区三区| 在线看国产一区| 亚洲va韩国va欧美va精品| 欧美专区日韩专区| 亚洲国产成人tv| 69久久夜色精品国产69蝌蚪网| 五月激情综合色| 91麻豆精品91久久久久久清纯| 日本不卡一区二区三区 | 欧美大片国产精品| 久久超碰97人人做人人爱| 日韩欧美成人激情| 韩国中文字幕2020精品| 久久日一线二线三线suv| 国产久卡久卡久卡久卡视频精品| 国产视频一区在线观看| 不卡av在线网| 一区二区三区在线观看网站| 欧美午夜精品一区二区三区| 五月婷婷久久丁香| 欧美一区二区不卡视频| 九九国产精品视频| 欧美国产一区视频在线观看| 久久亚洲综合av| aa级大片欧美| 亚洲午夜精品17c| 日韩色视频在线观看| 高清国产一区二区| 亚洲久本草在线中文字幕| 欧美日韩国产大片| 激情深爱一区二区| 国产精品成人午夜| 欧美日韩视频专区在线播放| 久久精品国产亚洲一区二区三区| 国产亚洲欧美一级| 色婷婷av一区二区三区大白胸 | 在线电影国产精品| 国产精品一区在线| 一区二区三区在线免费播放 | 欧美二区在线观看| 国产一区二区三区在线观看免费 | 激情欧美一区二区三区在线观看| 国产精品毛片久久久久久久| 欧洲一区二区三区在线| 国产专区欧美精品| 亚洲综合区在线| 久久众筹精品私拍模特| 色综合一个色综合亚洲| 91理论电影在线观看| 首页欧美精品中文字幕| 欧美激情中文不卡| 欧美日韩视频在线第一区| 风间由美性色一区二区三区| 亚洲国产精品久久不卡毛片| 久久天天做天天爱综合色| 精品视频在线免费看| 国产成人免费高清| 日本亚洲电影天堂| 一区二区三区不卡视频在线观看| 26uuu欧美| 7777女厕盗摄久久久| a4yy欧美一区二区三区|