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

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

?? usbdrvasm16.s

?? AVR_Meag8單片機控制三基色的LED
?? S
?? 第 1 頁 / 共 2 頁
字號:
/* Name: usbdrvasm16.S * Project: AVR USB driver * Author: Christian Starkjohann * Creation Date: 2007-06-15 * 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 MHz version of the asssembler part of the USB driver. Itrequires a 16 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!*/;max stack usage: [ret(2), YL, SREG, YH, bitcnt, shift, x1, x2, x3, x4, cnt] = 12 bytes;nominal frequency: 16 MHz -> 10.6666666 cycles per bit, 85.333333333 cycles per byte; Numbers in brackets are clocks counted from center of last sync bit; when instruction startsSIG_INTERRUPT0:;order of registers pushed: YL, SREG YH, [sofError], bitcnt, shift, x1, x2, x3, x4, cnt    push    YL                  ;[-25] push only what is necessary to sync with edge ASAP    in      YL, SREG            ;[-23]    push    YL                  ;[-22]    push    YH                  ;[-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    bitcnt              ;[-12];   [---]                       ;[-11]    lds     YL, usbInputBufOffset;[-10];   [---]                       ;[-9]    clr     YH                  ;[-8]    subi    YL, lo8(-(usbRxBuf));[-7] [rx loop init]    sbci    YH, hi8(-(usbRxBuf));[-6] [rx loop init]    push    shift               ;[-5];   [---]                       ;[-4]    ldi     bitcnt, 0x55        ;[-3] [rx loop init]    sbis    USBIN, USBMINUS     ;[-2] we want two bits K (sample 2 cycles too early)    rjmp    haveTwoBitsK        ;[-1]    pop     shift               ;[0] undo the push from before    pop     bitcnt              ;[2] undo the push from before    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 (= 21 cycles).;----------------------------------------------------------------------------; push more registers and initialize values while we sample the first bits:;----------------------------------------------------------------------------haveTwoBitsK:    push    x1              ;[1]    push    x2              ;[3]    push    x3              ;[5]    ldi     shift, 0        ;[7]    ldi     x3, 1<<4        ;[8] [rx loop init] first sample is inverse bit, compensate that    push    x4              ;[9] == leap    in      x1, USBIN       ;[11] <-- sample bit 0    andi    x1, USBMASK     ;[12]    bst     x1, USBMINUS    ;[13]    bld     shift, 7        ;[14]    push    cnt             ;[15]    ldi     leap, 0         ;[17] [rx loop init]    ldi     cnt, USB_BUFSIZE;[18] [rx loop init]    rjmp    rxbit1          ;[19] arrives at [21];----------------------------------------------------------------------------; Receiver loop (numbers in brackets are cycles within byte after instr);----------------------------------------------------------------------------unstuff6:    andi    x2, USBMASK ;[03]    ori     x3, 1<<6    ;[04] will not be shifted any more    andi    shift, ~0x80;[05]    mov     x1, x2      ;[06] sampled bit 7 is actually re-sampled bit 6    subi    leap, 3     ;[07] since this is a short (10 cycle) bit, enforce leap bit    rjmp    didUnstuff6 ;[08]unstuff7:    ori     x3, 1<<7    ;[09] will not be shifted any more    in      x2, USBIN   ;[00] [10]  re-sample bit 7    andi    x2, USBMASK ;[01]    andi    shift, ~0x80;[02]    subi    leap, 3     ;[03] since this is a short (10 cycle) bit, enforce leap bit    rjmp    didUnstuff7 ;[04]unstuffEven:    ori     x3, 1<<6    ;[09] will be shifted right 6 times for bit 0    in      x1, USBIN   ;[00] [10]    andi    shift, ~0x80;[01]    andi    x1, USBMASK ;[02]    breq    se0         ;[03]    subi    leap, 3     ;[04] since this is a short (10 cycle) bit, enforce leap bit    nop                 ;[05]    rjmp    didUnstuffE ;[06]unstuffOdd:    ori     x3, 1<<5    ;[09] will be shifted right 4 times for bit 1    in      x2, USBIN   ;[00] [10]    andi    shift, ~0x80;[01]    andi    x2, USBMASK ;[02]    breq    se0         ;[03]    subi    leap, 3     ;[04] since this is a short (10 cycle) bit, enforce leap bit    nop                 ;[05]    rjmp    didUnstuffO ;[06]rxByteLoop:    andi    x1, USBMASK ;[03]    eor     x2, x1      ;[04]    subi    leap, 1     ;[05]    brpl    skipLeap    ;[06]    subi    leap, -3    ;1 one leap cycle every 3rd byte -> 85 + 1/3 cycles per byte    nop                 ;1skipLeap:    subi    x2, 1       ;[08]    ror     shift       ;[09]didUnstuff6:    cpi     shift, 0xfc ;[10]    in      x2, USBIN   ;[00] [11] <-- sample bit 7    brcc    unstuff6    ;[01]    andi    x2, USBMASK ;[02]    eor     x1, x2      ;[03]    subi    x1, 1       ;[04]    ror     shift       ;[05]didUnstuff7:    cpi     shift, 0xfc ;[06]    brcc    unstuff7    ;[07]    eor     x3, shift   ;[08] reconstruct: x3 is 1 at bit locations we changed, 0 at others    st      y+, x3      ;[09] store datarxBitLoop:    in      x1, USBIN   ;[00] [11] <-- sample bit 0/2/4    andi    x1, USBMASK ;[01]    eor     x2, x1      ;[02]    andi    x3, 0x3f    ;[03] topmost two bits reserved for 6 and 7    subi    x2, 1       ;[04]    ror     shift       ;[05]    cpi     shift, 0xfc ;[06]    brcc    unstuffEven ;[07]didUnstuffE:    lsr     x3          ;[08]    lsr     x3          ;[09]rxbit1:    in      x2, USBIN   ;[00] [10] <-- sample bit 1/3/5    andi    x2, USBMASK ;[01]    breq    se0         ;[02]    eor     x1, x2      ;[03]    subi    x1, 1       ;[04]    ror     shift       ;[05]    cpi     shift, 0xfc ;[06]    brcc    unstuffOdd  ;[07]didUnstuffO:    subi    bitcnt, 0xab;[08] == addi 0x55, 0x55 = 0x100/3    brcs    rxBitLoop   ;[09]    subi    cnt, 1      ;[10]    in      x1, USBIN   ;[00] [11] <-- sample bit 6    brcc    rxByteLoop  ;[01]    rjmp    ignorePacket; overflow;----------------------------------------------------------------------------; Processing of received packet (numbers in brackets are cycles after center 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:    subi    cnt, USB_BUFSIZE    ;[5]    neg     cnt                 ;[6]    cpi     cnt, 3              ;[7]    ldi     x2, 1<<USB_INTR_PENDING_BIT ;[8]    out     USB_INTR_PENDING, x2;[9] clear pending intr and check flag later. SE0 should be over.    brlo    doReturn            ;[10] this is probably an ACK, NAK or similar packet    sub     YL, cnt             ;[11]    sbci    YH, 0               ;[12]    ld      token, y            ;[13]    cpi     token, USBPID_DATA0 ;[15]    breq    handleData          ;[16]    cpi     token, USBPID_DATA1 ;[17]    breq    handleData          ;[18]    ldd     x2, y+1             ;[19] ADDR and 1 bit endpoint number    mov     x3, x2              ;[21] store for endpoint number    andi    x2, 0x7f            ;[22] x2 is now ADDR    lds     shift, usbDeviceAddr;[23]    cp      x2, shift           ;[25]overflow:                       ; This is a hack: brcs overflow will never have Z flag set    brne    ignorePacket        ;[26] packet for different address    cpi     token, USBPID_IN    ;[27]    breq    handleIn            ;[28]    cpi     token, USBPID_SETUP ;[29]    breq    handleSetupOrOut    ;[30]    cpi     token, USBPID_OUT   ;[31]    breq    handleSetupOrOut    ;[32];   rjmp    ignorePacket        ;fallthrough, should not happen anyway.ignorePacket:    clr     shift    sts     usbCurrentTok, shift

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91啦中文在线观看| 欧美一区二区成人6969| 日韩欧美一区在线观看| 国产精品欧美一级免费| 免费在线欧美视频| 一本一本久久a久久精品综合麻豆| 欧美一区二区三区在线观看| 一区二区在线观看免费视频播放| 国产传媒日韩欧美成人| 在线综合亚洲欧美在线视频| 亚洲免费伊人电影| 成人午夜av影视| 久久亚洲精品小早川怜子| 天天影视网天天综合色在线播放| fc2成人免费人成在线观看播放| 欧美成人欧美edvon| 午夜久久久久久电影| 日本高清无吗v一区| 中国色在线观看另类| 国产一区二区三区不卡在线观看| 91精品黄色片免费大全| 亚洲国产乱码最新视频| 色婷婷精品久久二区二区蜜臀av| 国产精品卡一卡二| 精品视频在线免费看| 亚洲精选免费视频| 色偷偷成人一区二区三区91| 亚洲日本在线看| 91啪亚洲精品| 亚洲欧美一区二区三区久本道91| 成人av动漫网站| 国产精品视频九色porn| 不卡一区中文字幕| 自拍偷在线精品自拍偷无码专区| 成人激情小说乱人伦| 国产精品天美传媒| 91在线视频18| 亚洲图片有声小说| 777xxx欧美| 久久精工是国产品牌吗| 精品不卡在线视频| 国产成人av一区| 亚洲色图欧美激情| 欧美亚洲国产一卡| 青青青爽久久午夜综合久久午夜| 欧美一区二区三区在线| 韩日av一区二区| 亚洲国产精品成人综合色在线婷婷| 成人免费视频一区| 亚洲一区在线观看视频| 7777精品伊人久久久大香线蕉| 美国毛片一区二区| 国产欧美精品一区二区三区四区| 成人精品视频网站| 亚洲激情欧美激情| 日韩欧美一卡二卡| jizzjizzjizz欧美| 天堂av在线一区| 国产婷婷一区二区| 91黄视频在线| 精品在线你懂的| 《视频一区视频二区| 欧美日韩小视频| 黄色资源网久久资源365| 中文字幕中文字幕一区二区 | 欧美高清dvd| 韩国三级电影一区二区| 亚洲人成在线观看一区二区| 日韩欧美在线影院| 成人午夜免费av| 天堂一区二区在线免费观看| 久久久国际精品| 欧美三级日韩在线| 国产91精品露脸国语对白| 亚洲成人av福利| 国产精品欧美一级免费| 91麻豆精品国产自产在线观看一区 | 石原莉奈在线亚洲二区| 国产日韩欧美一区二区三区综合 | 日韩黄色免费电影| 国产精品精品国产色婷婷| 欧美一卡在线观看| 99久久精品国产精品久久| 麻豆精品一区二区综合av| 亚洲日本丝袜连裤袜办公室| www成人在线观看| 欧美色倩网站大全免费| av在线不卡电影| 麻豆成人在线观看| 亚洲一区电影777| 国产精品久久毛片a| 26uuu亚洲综合色欧美| 777亚洲妇女| 在线观看亚洲成人| 99久久久精品| 国产99久久久精品| 国产在线精品免费| 人人爽香蕉精品| 图片区小说区区亚洲影院| 自拍偷拍欧美精品| 亚洲欧洲日韩av| 国产精品久线观看视频| 久久久91精品国产一区二区三区| 日韩欧美黄色影院| 日韩三级.com| 91精品国产综合久久福利| 欧美日韩日日夜夜| 欧美主播一区二区三区| 日本精品一区二区三区高清| 91麻豆免费看| 色综合久久久久综合体桃花网| 顶级嫩模精品视频在线看| 国产高清精品在线| 成人综合激情网| 成人a区在线观看| 99久久伊人久久99| 99久久精品99国产精品| 91视频一区二区| 在线观看亚洲一区| 欧美人与性动xxxx| 日韩视频免费观看高清在线视频| 日韩一区二区三| 2024国产精品视频| 中文字幕不卡在线观看| 中文字幕一区在线观看| 亚洲蜜臀av乱码久久精品| 亚洲主播在线观看| 无码av免费一区二区三区试看| 免费观看久久久4p| 国产一区二三区好的| 丁香婷婷综合激情五月色| 91丨九色丨尤物| 欧美日韩高清在线| 26uuu亚洲综合色| 国产精品传媒入口麻豆| 夜夜揉揉日日人人青青一国产精品| 午夜国产精品影院在线观看| 久草中文综合在线| jiyouzz国产精品久久| 欧美色欧美亚洲另类二区| 精品少妇一区二区三区在线视频 | 日韩视频中午一区| 国产三级三级三级精品8ⅰ区| 日韩伦理免费电影| 日韩国产一二三区| 国产成人免费视频网站| 91高清视频在线| 久久综合色婷婷| 一区二区三区久久久| 蜜臀av一区二区在线观看| 成人激情图片网| 7777女厕盗摄久久久| 国产精品久久久久一区二区三区| 亚洲成人动漫一区| 懂色av中文一区二区三区| 91电影在线观看| 久久久久国产精品麻豆ai换脸| 亚洲伦理在线精品| 国产综合久久久久久久久久久久| 色综合一个色综合亚洲| 精品理论电影在线| 一区二区三区视频在线看| 精品无人区卡一卡二卡三乱码免费卡| 99久久免费精品高清特色大片| 欧美狂野另类xxxxoooo| 亚洲国产精品成人综合色在线婷婷| 五月天激情综合网| 99久久精品一区| 久久蜜桃av一区二区天堂| 午夜精品久久久久久不卡8050| 大白屁股一区二区视频| 日韩欧美在线网站| 午夜免费久久看| 色www精品视频在线观看| 久久精品一区二区三区av| 人人狠狠综合久久亚洲| 欧美视频在线观看一区| 国产精品乱码久久久久久| 久久精品国产999大香线蕉| 欧美日韩一级片网站| 亚洲日本va午夜在线电影| 粉嫩久久99精品久久久久久夜 | 国产亚洲欧美一级| 久久99在线观看| 欧美一区二区三区日韩| 亚洲第一福利视频在线| 色综合久久88色综合天天免费| 亚洲国产高清不卡| 国产一区不卡精品| 精品国产凹凸成av人网站| 天天综合天天做天天综合| 欧美日韩性生活| 天天影视色香欲综合网老头| 欧美视频一区二区在线观看| 亚洲精品国产精品乱码不99| 91亚洲男人天堂| 国产精品国产a级| 99热在这里有精品免费| 亚洲色图欧洲色图婷婷| 91视视频在线观看入口直接观看www|