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

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

?? usbdrvasm165.inc

?? AVR單片機(jī)模擬USB實(shí)現(xiàn)CDC類串行口
?? INC
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/* Name: usbdrvasm165.inc * 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 startsUSB_INTR_VECTOR:;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#if USB_COUNT_SOF    lds     YL, usbSofCount    inc     YL    sts     usbSofCount, YL#endif  /* USB_COUNT_SOF */    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]

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精选视频在线| 亚洲最快最全在线视频| 日韩欧美国产成人一区二区| 欧美性色欧美a在线播放| 99国产精品国产精品毛片| 国产福利一区二区三区视频在线 | 91精品黄色片免费大全| 欧美性受xxxx| 欧美日韩一区三区四区| 欧美伊人精品成人久久综合97| 91丨porny丨中文| 色妞www精品视频| 一本一道波多野结衣一区二区| 91日韩精品一区| 一本一本久久a久久精品综合麻豆| av不卡一区二区三区| 91成人免费网站| 欧美日韩亚洲国产综合| 91精品婷婷国产综合久久性色| 777久久久精品| 日韩女同互慰一区二区| 久久伊99综合婷婷久久伊| 中文字幕欧美激情一区| 《视频一区视频二区| 亚洲午夜久久久久久久久电影院| 午夜影院在线观看欧美| 裸体歌舞表演一区二区| 国产一区二区三区黄视频| 成人永久免费视频| 91丝袜美腿高跟国产极品老师| 久久99国产精品免费| 蜜桃视频在线一区| 久久精品国产亚洲高清剧情介绍 | 7777精品伊人久久久大香线蕉超级流畅 | 欧美性色综合网| 欧美日韩国产影片| 91精品免费在线观看| 日韩亚洲欧美综合| 精品国产一区久久| 国产午夜精品理论片a级大结局| 国产日韩精品一区| 久久美女高清视频| 国产精品福利一区| 一区二区三区四区激情| 日韩精品三区四区| 黑人精品欧美一区二区蜜桃| 国产在线精品一区二区三区不卡| 韩国av一区二区三区| 国产精品影视天天线| 成人看片黄a免费看在线| 色94色欧美sute亚洲13| 欧美xxxxx裸体时装秀| 欧美激情在线一区二区三区| 亚洲久本草在线中文字幕| 日本vs亚洲vs韩国一区三区| 国产一区999| 色噜噜夜夜夜综合网| 在线播放视频一区| 国产欧美日韩精品在线| 亚洲一区二区三区国产| 蜜臀av在线播放一区二区三区| 国产一区二区三区| 91日韩一区二区三区| 欧美精品日日鲁夜夜添| 国产亚洲精品久| 亚洲一区二区三区小说| 乱一区二区av| 色婷婷综合久色| 精品国产一区二区亚洲人成毛片| 国产精品久久久一本精品| 天天综合色天天综合色h| 国产乱人伦偷精品视频不卡| 91久久线看在观草草青青| 欧美tickle裸体挠脚心vk| 综合激情成人伊人| 麻豆精品国产91久久久久久| 国产91综合一区在线观看| 欧美一区二区三区免费观看视频| 亚洲视频在线一区| 麻豆91精品91久久久的内涵| 91色婷婷久久久久合中文| 日韩欧美国产精品一区| 国产精品私房写真福利视频| 污片在线观看一区二区| 成人av高清在线| www精品美女久久久tv| 亚洲综合图片区| 懂色av中文字幕一区二区三区| 欧美色成人综合| 国产精品人人做人人爽人人添| 日本美女视频一区二区| 91浏览器入口在线观看| 久久久久9999亚洲精品| 日韩不卡一二三区| 91黄视频在线观看| 中文在线资源观看网站视频免费不卡| 亚洲一级二级三级在线免费观看| 国产成人午夜片在线观看高清观看| 69av一区二区三区| 亚洲一区二区三区美女| 一本久道久久综合中文字幕| 国产色一区二区| 日日嗨av一区二区三区四区| 在线一区二区三区四区| 成人免费一区二区三区视频| 久久99日本精品| 日韩精品一区二区三区蜜臀 | 亚洲福利电影网| 99国产精品国产精品毛片| 国产精品美日韩| 国产成人免费高清| 久久久国产综合精品女国产盗摄| 日本不卡一区二区三区| 欧美三区在线视频| 亚洲成人av一区| 在线观看av不卡| 亚洲综合一区二区精品导航| 欧洲精品一区二区三区在线观看| 亚洲欧美偷拍另类a∨色屁股| 国产高清在线精品| 日韩午夜激情免费电影| 婷婷久久综合九色综合伊人色| 欧美性大战久久| 婷婷激情综合网| 这里只有精品视频在线观看| 偷窥少妇高潮呻吟av久久免费| 欧美在线视频不卡| 亚洲图片欧美色图| 欧美日韩你懂得| 日韩高清中文字幕一区| 91精品国产麻豆国产自产在线| 日日夜夜精品视频免费| 日韩精品一区二区三区视频| 蜜臀精品一区二区三区在线观看 | 国模大尺度一区二区三区| 在线不卡欧美精品一区二区三区| 亚洲制服丝袜一区| 在线免费观看一区| 亚洲一本大道在线| 欧美日韩一级片在线观看| 日韩黄色免费网站| 日韩免费看的电影| 国产精品白丝jk白祙喷水网站 | 91精品国产91久久久久久最新毛片| 中文字幕免费不卡在线| 懂色一区二区三区免费观看| 亚洲色图19p| 99国产精品久| 天天综合色天天| 久久综合狠狠综合久久综合88| 99re这里只有精品视频首页| 一区二区三区自拍| 亚洲精品一区在线观看| 在线观看国产精品网站| 日韩电影在线观看网站| 久久综合色综合88| 91网站视频在线观看| 日本aⅴ亚洲精品中文乱码| 国产日韩在线不卡| 日本乱码高清不卡字幕| 久久99国产精品久久| 亚洲图片你懂的| 777xxx欧美| 成人h动漫精品一区二区| 亚洲精品乱码久久久久久黑人| 欧美一区二区三级| 日本午夜精品视频在线观看| 国产精品久久久久久久久免费相片| 色综合久久精品| 美女一区二区在线观看| 中文字幕一区二区三区四区| 欧美精品高清视频| 国产99精品在线观看| 调教+趴+乳夹+国产+精品| 欧美大白屁股肥臀xxxxxx| 色综合久久88色综合天天免费| 蜜臀av性久久久久蜜臀av麻豆| 国产欧美一区视频| 欧美日韩视频一区二区| 高清不卡一区二区在线| 亚洲二区视频在线| 国产精品无圣光一区二区| 在线不卡的av| 91蝌蚪porny九色| 亚洲成av人片一区二区| 亚洲特级片在线| 久久午夜免费电影| 欧美日本在线看| 91免费观看视频| 国产老肥熟一区二区三区| 午夜一区二区三区视频| 久久久国产精品麻豆| 欧美伦理电影网| 91香蕉视频在线| 国产一二三精品| 狂野欧美性猛交blacked| 亚洲一区二区四区蜜桃| 国产精品对白交换视频| 2020国产成人综合网| 欧美视频在线不卡|