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

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

?? usbdrvasm165.s

?? avr單片機usb下載器的制作資料
?? S
?? 第 1 頁 / 共 2 頁
字號:
/* Name: usbdrvasm165.S * Project: AVR USB driver * Author: Christian Starkjohann * Creation Date: 2007-04-22 * Tabsize: 4 * Copyright: (c) 2007 by OBJECTIVE DEVELOPMENT Software GmbH * License: GNU GPL v2 (see License.txt) or proprietary (CommercialLicense.txt) * Revision: $Id$ *//* Do not link this file! Link usbdrvasm.S instead, which includes the * appropriate implementation! *//*General Description:This file is the 16.5 MHz version of the USB driver. It is intended for theATTiny45 and similar controllers running on 16.5 MHz internal RC oscillator.This version contains a phase locked loop in the receiver routine to cope withslight clock rate deviations of up to +/- 1%.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!*/;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: 59 cycles -> max 52 cycles interrupt disable;max stack usage: [ret(2), r0, SREG, YL, YH, shift, x1, x2, x3, x4, cnt] = 12 bytes;nominal frequency: 16.5 MHz -> 11 cycles per bit; 16.3125 MHz < F_CPU < 16.6875 MHz (+/- 1.1%); Numbers in brackets are clocks counted from center of last sync bit; when instruction startsSIG_INTERRUPT0:;order of registers pushed: r0, SREG [sofError], YL, YH, shift, x1, x2, x3, x4, cnt    push    r0                  ;[-23] push only what is necessary to sync with edge ASAP    in      r0, SREG            ;[-21]    push    r0                  ;[-20];----------------------------------------------------------------------------; 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     ;[-18] wait for D- == 1    rjmp    waitForJwaitForK:;The following code results in a sampling window of < 1/4 bit which meets the spec.    sbis    USBIN, USBMINUS     ;[-15]    rjmp    foundK              ;[-14]    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:                         ;[-12];{3, 5} after falling D- edge, average delay: 4 cycles [we want 5 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    YL                  ;[-12];   [---]                       ;[-11]    push    YH                  ;[-10];   [---]                       ;[-9]    lds     YL, usbInputBufOffset;[-8];   [---]                       ;[-7]    clr     YH                  ;[-6]    subi    YL, lo8(-(usbRxBuf));[-5] [rx loop init]    sbci    YH, hi8(-(usbRxBuf));[-4] [rx loop init]    mov     r0, x2              ;[-3] [rx loop init]    sbis    USBIN, USBMINUS     ;[-2] we want two bits K (sample 2 cycles too early)    rjmp    haveTwoBitsK        ;[-1]    pop     YH                  ;[0] undo the pushes from before    pop     YL                  ;[2]    rjmp    waitForK            ;[4] this was not the end of sync, retry; The entire loop from waitForK until rjmp waitForK above must not exceed two; bit times (= 22 cycles).;----------------------------------------------------------------------------; push more registers and initialize values while we sample the first bits:;----------------------------------------------------------------------------haveTwoBitsK:               ;[1]    push    shift           ;[1]    push    x1              ;[3]    push    x2              ;[5]    push    x3              ;[7]    ldi     shift, 0xff     ;[9] [rx loop init]    ori     x3, 0xff        ;[10] [rx loop init] == ser x3, clear zero flag    in      x1, USBIN       ;[11] <-- sample bit 0    bst     x1, USBMINUS    ;[12]    bld     shift, 0        ;[13]    push    x4              ;[14] == phase;   [---]                   ;[15]    push    cnt             ;[16];   [---]                   ;[17]    ldi     phase, 0        ;[18] [rx loop init]    ldi     cnt, USB_BUFSIZE;[19] [rx loop init]    rjmp    rxbit1          ;[20];   [---]                   ;[21];----------------------------------------------------------------------------; Receiver loop (numbers in brackets are cycles within byte after instr);----------------------------------------------------------------------------/*byte oriented operations done during loop:bit 0: store databit 1: SE0 checkbit 2: overflow checkbit 3: catch upbit 4: rjmp to achieve conditional jump rangebit 5: PLLbit 6: catch upbit 7: jump, fixup bitstuff; 87 [+ 2] cycles------------------------------------------------------------------*/continueWithBit5:    in      x2, USBIN       ;[055] <-- bit 5    eor     r0, x2          ;[056]    or      phase, r0       ;[057]    sbrc    phase, USBMINUS ;[058]    lpm                     ;[059] optional nop3; modifies r0    in      phase, USBIN    ;[060] <-- phase    eor     x1, x2          ;[061]    bst     x1, USBMINUS    ;[062]    bld     shift, 5        ;[063]    andi    shift, 0x3f     ;[064]    in      x1, USBIN       ;[065] <-- bit 6    breq    unstuff5        ;[066] *** unstuff escape    eor     phase, x1       ;[067]    eor     x2, x1          ;[068]    bst     x2, USBMINUS    ;[069]    bld     shift, 6        ;[070]didUnstuff6:                ;[   ]    in      r0, USBIN       ;[071] <-- phase    cpi     shift, 0x02     ;[072]    brlo    unstuff6        ;[073] *** unstuff escapedidUnstuff5:                ;[   ]    nop2                    ;[074];   [---]                   ;[075]    in      x2, USBIN       ;[076] <-- bit 7    eor     x1, x2          ;[077]    bst     x1, USBMINUS    ;[078]    bld     shift, 7        ;[079]didUnstuff7:                ;[   ]    eor     r0, x2          ;[080]    or      phase, r0       ;[081]    in      r0, USBIN       ;[082] <-- phase    cpi     shift, 0x04     ;[083]    brsh    rxLoop          ;[084];   [---]                   ;[085]unstuff7:                   ;[   ]    andi    x3, ~0x80       ;[085]    ori     shift, 0x80     ;[086]    in      x2, USBIN       ;[087] <-- sample stuffed bit 7    nop                     ;[088]    rjmp    didUnstuff7     ;[089];   [---]                   ;[090]                            ;[080]unstuff5:                   ;[067]    eor     phase, x1       ;[068]    andi    x3, ~0x20       ;[069]    ori     shift, 0x20     ;[070]    in      r0, USBIN       ;[071] <-- phase    mov     x2, x1          ;[072]    nop                     ;[073]    nop2                    ;[074];   [---]                   ;[075]    in      x1, USBIN       ;[076] <-- bit 6    eor     r0, x1          ;[077]    or      phase, r0       ;[078]    eor     x2, x1          ;[079]    bst     x2, USBMINUS    ;[080]    bld     shift, 6        ;[081] no need to check bitstuffing, we just had one    in      r0, USBIN       ;[082] <-- phase    rjmp    didUnstuff5     ;[083];   [---]                   ;[084]                            ;[074]unstuff6:                   ;[074]    andi    x3, ~0x40       ;[075]    in      x1, USBIN       ;[076] <-- bit 6 again    ori     shift, 0x40     ;[077]    nop2                    ;[078];   [---]                   ;[079]    rjmp    didUnstuff6     ;[080];   [---]                   ;[081]                            ;[071]unstuff0:                   ;[013]    eor     r0, x2          ;[014]    or      phase, r0       ;[015]    andi    x2, USBMASK     ;[016] check for SE0    in      r0, USBIN       ;[017] <-- phase    breq    didUnstuff0     ;[018] direct jump to se0 would be too long    andi    x3, ~0x01       ;[019]    ori     shift, 0x01     ;[020]    mov     x1, x2          ;[021] mov existing sample    in      x2, USBIN       ;[022] <-- bit 1 again    rjmp    didUnstuff0     ;[023];   [---]                   ;[024]                            ;[014]unstuff1:                   ;[024]    eor     r0, x1          ;[025]    or      phase, r0       ;[026]    andi    x3, ~0x02       ;[027]    in      r0, USBIN       ;[028] <-- phase    ori     shift, 0x02     ;[029]    mov     x2, x1          ;[030]    rjmp    didUnstuff1     ;[031];   [---]                   ;[032]                            ;[022]unstuff2:                   ;[035]    eor     r0, x2          ;[036]    or      phase, r0       ;[037]    andi    x3, ~0x04       ;[038]    in      r0, USBIN       ;[039] <-- phase    ori     shift, 0x04     ;[040]    mov     x1, x2          ;[041]    rjmp    didUnstuff2     ;[042];   [---]                   ;[043]                            ;[033]unstuff3:                   ;[043]    in      x2, USBIN       ;[044] <-- bit 3 again    eor     r0, x2          ;[045]    or      phase, r0       ;[046]    andi    x3, ~0x08       ;[047]    ori     shift, 0x08     ;[048]    nop                     ;[049]    in      r0, USBIN       ;[050] <-- phase    rjmp    didUnstuff3     ;[051];   [---]                   ;[052]                            ;[042]unstuff4:                   ;[053]    andi    x3, ~0x10       ;[054]    in      x1, USBIN       ;[055] <-- bit 4 again    ori     shift, 0x10     ;[056]    rjmp    didUnstuff4     ;[057];   [---]                   ;[058]                            ;[048]rxLoop:                     ;[085]    eor     x3, shift       ;[086] reconstruct: x3 is 0 at bit locations we changed, 1 at others    in      x1, USBIN       ;[000] <-- bit 0    st      y+, x3          ;[001];   [---]                   ;[002]    eor     r0, x1          ;[003]    or      phase, r0       ;[004]    eor     x2, x1          ;[005]    in      r0, USBIN       ;[006] <-- phase    ser     x3              ;[007]    bst     x2, USBMINUS    ;[008]    bld     shift, 0        ;[009]    andi    shift, 0xf9     ;[010]rxbit1:                     ;[   ]    in      x2, USBIN       ;[011] <-- bit 1    breq    unstuff0        ;[012] *** unstuff escape    andi    x2, USBMASK     ;[013] SE0 check for bit 1didUnstuff0:                ;[   ] Z only set if we detected SE0 in bitstuff    breq    se0             ;[014]    eor     r0, x2          ;[015]    or      phase, r0       ;[016]    in      r0, USBIN       ;[017] <-- phase    eor     x1, x2          ;[018]    bst     x1, USBMINUS    ;[019]    bld     shift, 1        ;[020]    andi    shift, 0xf3     ;[021]didUnstuff1:                ;[   ]    in      x1, USBIN       ;[022] <-- bit 2    breq    unstuff1        ;[023] *** unstuff escape    eor     r0, x1          ;[024]

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品欧美久久久久久动漫 | 亚洲一区二区三区四区在线观看 | 风间由美中文字幕在线看视频国产欧美 | 91蜜桃免费观看视频| 欧美狂野另类xxxxoooo| 国产欧美精品国产国产专区| 婷婷成人综合网| 99视频一区二区| 2024国产精品| 丝袜国产日韩另类美女| 成年人国产精品| 久久影院午夜片一区| 亚洲成av人综合在线观看| 不卡的av中国片| 久久色成人在线| 美女爽到高潮91| 日韩三级视频在线看| 亚洲午夜久久久久久久久电影院| 成人av资源站| 国产欧美日本一区视频| 美女高潮久久久| 91精品国产一区二区人妖| 一区二区三区在线观看欧美| av资源网一区| 国产欧美一区二区精品秋霞影院| 蜜臀av一级做a爰片久久| 欧美日韩电影在线| 亚洲综合激情网| 日本乱人伦aⅴ精品| 亚洲欧美色综合| 日韩免费电影一区| 香蕉影视欧美成人| 欧美日韩日本视频| 亚洲午夜久久久| 欧美日韩在线播放三区四区| 一区二区欧美在线观看| 色婷婷av一区二区三区大白胸 | 欧美不卡视频一区| 视频一区中文字幕| 91精品一区二区三区久久久久久| 亚洲一卡二卡三卡四卡无卡久久| 欧美性生交片4| 亚洲国产一区二区三区 | 成人在线视频一区二区| 中文av一区二区| 91在线视频观看| 一区二区三区色| 欧美老女人在线| 麻豆国产精品官网| 久久精品男人的天堂| 成人精品一区二区三区中文字幕| 亚洲欧洲成人av每日更新| 色欧美88888久久久久久影院| 怡红院av一区二区三区| 欧美美女黄视频| 激情综合色丁香一区二区| 久久精品亚洲精品国产欧美kt∨| 成人一二三区视频| 夜夜嗨av一区二区三区中文字幕| 欧美久久久久久蜜桃| 精品一区二区三区在线播放| 亚洲国产经典视频| 欧美亚洲愉拍一区二区| 日本亚洲一区二区| 久久精品日韩一区二区三区| 91视频你懂的| 青青草一区二区三区| 国产精品色哟哟| 欧美日韩一区高清| 国产精品资源在线| 亚洲麻豆国产自偷在线| 欧美一区二区播放| 99精品在线免费| 久久99久久99| 一区二区久久久久久| 久久综合99re88久久爱| 日本韩国欧美在线| 国内成人免费视频| 亚洲国产综合在线| 中文一区二区完整视频在线观看| 欧美日韩国产乱码电影| 成人免费观看男女羞羞视频| 午夜精品免费在线观看| 欧美国产97人人爽人人喊| 欧美一级日韩一级| 在线观看www91| 粉嫩在线一区二区三区视频| 免费看精品久久片| 亚洲欧美日韩一区二区| 久久久久久麻豆| 91精品国产黑色紧身裤美女| 色综合久久中文综合久久牛| 国产精品亚洲一区二区三区在线| 午夜婷婷国产麻豆精品| 综合中文字幕亚洲| 国产人妖乱国产精品人妖| 777xxx欧美| 欧美三级电影一区| 91在线视频观看| 丁香啪啪综合成人亚洲小说 | 久久99久久久久久久久久久| 亚洲最新视频在线播放| 国产精品福利一区| 久久精品在这里| 久久精品在线免费观看| 精品电影一区二区| 日韩久久久久久| 日韩欧美在线一区二区三区| 欧美日韩精品一二三区| 欧美在线视频不卡| 色婷婷综合久久久久中文一区二区 | 久久99久久99| 麻豆专区一区二区三区四区五区| 亚洲成人动漫一区| 香蕉成人伊视频在线观看| 亚洲国产中文字幕在线视频综合| 亚洲精品你懂的| 依依成人精品视频| 亚洲精品国产第一综合99久久| 国产精品福利影院| 亚洲欧洲成人自拍| 日韩理论电影院| 一区二区日韩电影| 视频一区二区中文字幕| 五月激情综合色| 奇米色一区二区三区四区| 免费黄网站欧美| 精品亚洲免费视频| 国产精品影视网| 99视频精品在线| 91国偷自产一区二区三区成为亚洲经典| 91天堂素人约啪| 欧洲精品中文字幕| 欧美精品粉嫩高潮一区二区| 日韩一级在线观看| 久久众筹精品私拍模特| 国产精品久久久久久久第一福利| 亚洲婷婷综合久久一本伊一区 | 日韩av成人高清| 久久福利资源站| 成人高清视频在线| 欧美亚洲国产一卡| 日韩一区二区在线看| 国产亚洲欧洲一区高清在线观看| 中文在线一区二区| 亚洲国产精品久久不卡毛片| 日韩av一级电影| gogo大胆日本视频一区| 欧美日韩一区二区三区在线 | 日韩二区在线观看| 国产一区二区在线免费观看| av在线综合网| 欧美一区二区三区的| 国产欧美日韩卡一| 亚洲一卡二卡三卡四卡| 国产麻豆91精品| 欧洲精品中文字幕| 久久一区二区三区国产精品| 亚洲欧洲综合另类| 精品一区二区综合| 色妹子一区二区| 久久久久国产精品人| 亚洲一区二区欧美日韩| 国产风韵犹存在线视精品| 在线免费亚洲电影| 国产亚洲视频系列| 午夜精品久久久久久久久久久| 丁香另类激情小说| 欧美电视剧在线看免费| 亚洲黄色av一区| 福利一区在线观看| 精品嫩草影院久久| 亚洲国产日韩在线一区模特| 丁香激情综合五月| 欧美大片顶级少妇| 亚洲永久精品大片| 成人av小说网| 精品99999| 日本欧美一区二区在线观看| 色av成人天堂桃色av| 国产精品久久网站| 韩国v欧美v亚洲v日本v| 91精品啪在线观看国产60岁| 亚洲尤物视频在线| 91麻豆蜜桃一区二区三区| 日本一区二区三区在线不卡| 蜜桃av噜噜一区| 555www色欧美视频| 午夜免费久久看| 欧美性生交片4| 一区二区三区四区国产精品| av午夜一区麻豆| 欧美国产日本视频| 国产91在线|亚洲| 久久久久久久免费视频了| 黄色日韩三级电影| 欧美大白屁股肥臀xxxxxx| 美日韩一区二区| 日韩一区二区三区视频在线| 日本不卡视频一二三区|