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

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

?? flashpic.c

?? 《嵌入式固件開(kāi)發(fā)》一書(shū)的源碼
?? C
字號(hào):
/* flashpic.c:   This file contains the flash-support code that is relocated to   RAM prior to execution.  This file supports all bus widths, dependent   on the definition of WIDTH8, WIDTH16, or WIDTH32 on the command line.   Refer to flash.h for definition of the width-dependent macros.*/#include "config.h"#include "cpu.h"#include "flash.h"#include "flashdev.h"#if INCLUDE_FLASHtypedef unsigned char uchar;typedef unsigned short ushort;typedef unsigned long ulong;typedef volatile unsigned char vuchar;typedef volatile unsigned short vushort;typedef volatile unsigned long vulong;typedef volatile unsigned int vuint;typedef volatile int vint;extern struct flashinfo Fdev;extern int FlashProtectWindow;/* Flasherase():   Based on the 'snum' value, erase the appropriate sector(s).   Return 0 if success, else -1.*/intFLASHERASE(struct flashinfo *fdev,int snum){    ftype   val;    ulong   add;    int ret, sector;    ret = 0;    add = (ulong)(fdev->base);    /* Erase the request sector(s): */    for (sector=0;sector<fdev->sectorcnt;sector++) {        if ((!FlashProtectWindow) &&            (fdev->sectors[sector].protected)) {            add += fdev->sectors[sector].size;            continue;        }        if ((snum == ALL_SECTORS) || (snum == sector)) {            /* Issue the sector erase command sequence: */            Write_aa_to_5555();            Write_55_to_2aaa();            Write_80_to_5555();            Write_aa_to_5555();            Write_55_to_2aaa();            Write_30_to_(add);                /* Wait for sector erase to complete or timeout.. */            /* DQ7 polling: wait for D7 to be 1. */            /* DQ6 toggling: wait for D6 to not toggle. */            /* DQ5 timeout: if DQ7 is 0, and DQ5 = 1, timeout. */            while(1) {                if (Is_ff(add)) {                    if (Is_ff(add))                        break;                }                if (D5_Timeout(add)) {                    if (Is_not_ff(add))                        ret = -1;                    break;                }            }        }        add += fdev->sectors[sector].size;    }    /* If the erase failed for some reason, then issue the read/reset */    /* command sequence prior to returning... */    if (ret == -1) {        Write_aa_to_5555();        Write_55_to_2aaa();        Write_f0_to_5555();        val = Read_5555();    }    return(ret);}/* EndFlasherase():   Function place holder to determine the "end" of the   sectorerase() function.*/voidENDFLASHERASE(){}/* Flashwrite():   Return 0 if successful, else -1.   Note: this assumes that source & destination properly aligned   based on the width of the flash bank.*/intFLASHWRITE(struct flashinfo *fdev,ftype *dest,ftype *src,long bytecnt){    int i, ret;    ftype   val;    /* Each pass through this loop writes 'fdev->width' bytes... */    ret = 0;    for (i=0;i<bytecnt;i+=fdev->width) {        /* Flash write command */        Write_aa_to_5555();        Write_55_to_2aaa();        Write_a0_to_5555();        /* Write the value */        Fwrite(dest,src);        /* Wait for write to complete or timeout. */        while(1) {            if (Is_Equal(dest,src)) {                if (Is_Equal(dest,src))                    break;            }            /* Check D5 for timeout... */            if (D5_Timeout(dest)) {                if (Is_Not_Equal(dest,src))                    ret = -1;                goto done;            }        }        dest++; src++;    }done:    /* Read/reset command: */    Write_aa_to_5555();    Write_55_to_2aaa();    Write_f0_to_5555();    val = Read_5555();    return(ret);}/* EndFlashwrite():    Function place holder to determine the "end" of the    Flashwrite() function.*/voidENDFLASHWRITE(){}/* Ewrite():   Erase all sectors that are part of the address space to be written,   then write the data to that address space.  This is basically a   concatenation of flasherase and flashwrite done in one step.  This is   necessary primarily for re-writing the bootcode; because after the boot   code is erased, there is nowhere to return so the re-write must be done   while executing out of ram also.*/intFLASHEWRITE(struct flashinfo *fdev,ftype *dest,ftype *src,int bytecnt){    int i;    ulong   add;    void    (*reset)();    ftype   val, *src1, *dest1;    add = (ulong)(fdev->base);    src1 = src;    dest1 = dest;    /* For each sector, if it overlaps any of the destination space */    /* then erase that sector. */    for (i=0;i<fdev->sectorcnt;i++) {        if ((((uchar *)dest) > (fdev->sectors[i].end)) ||            (((uchar *)dest+bytecnt) < (fdev->sectors[i].begin))) {            add += fdev->sectors[i].size;            continue;        }        /* Sector erase command: */        Write_aa_to_5555();        Write_55_to_2aaa();        Write_80_to_5555();        Write_aa_to_5555();        Write_55_to_2aaa();        Write_30_to_(add);            /* Wait for sector erase to complete or timeout.. */        /* DQ7 polling: wait for D7 to be 1. */        /* DQ6 toggling: wait for D6 to not toggle. */        /* DQ5 timeout: if DQ7 is 0, and DQ5 = 1, timeout. */        while(1) {            if (Is_ff(add)) {                if (Is_ff(add))                    break;            }            /* Check D5 for timeout... */            /* In this case, there is nothing to return to */            /* because the flash was just erased, so just break.*/            if (D5_Timeout(add)) {                reset = (void(*)())(*(ulong *)RESET);                reset();            }        }        add += fdev->sectors[i].size;    }    /* Read/reset command: */    Write_aa_to_5555();    Write_55_to_2aaa();    Write_f0_to_5555();    val = Read_5555();    for(i=0;i<bytecnt;i+=fdev->width) {        /* Write command: */        Write_aa_to_5555();        Write_55_to_2aaa();        Write_a0_to_5555();        Fwrite(dest,src);        while(1) {            if (Is_Equal(dest,src)) {                if (Is_Equal(dest,src))                    break;            }            /* Check D5 for timeout... */            if (D5_Timeout(dest)) {                if (Is_Not_Equal(dest,src))                    return(-1);                break;            }        }        dest++; src++;    }    /* Issue the read/reset command sequence: */    Write_aa_to_5555();    Write_55_to_2aaa();    Write_f0_to_5555();    val = Read_5555();    /* Wait till flash is readable, or timeout: */    for(i=0;i<FLASH_TIMEOUT;i++) {        if (Is_Equal(dest1,src1))            break;    }    /* Now that the re-programming of flash is complete, reset: */    reset = (void(*)())(*(ulong *)RESET);    reset();    return(0);  /* won't get here */}/* EndFlashewrite():    Function place holder to determine the "end" of the    FlashEraseAndWrite() function.*/voidENDFLASHEWRITE(){}/* Flashtype():   Use the AUTOSELECT command sequence to determine the type of device.   Note: there is one additional step that I found necessary to keep   SGS29040 device happy... For some reason after issuing the read/reset   command and returning (to code that actually executes out of the FLASH   device) I was consistently getting an illegal opcode exception at   the return location in the flash.  It appears that the SGS part needs   a bit of time after the read/reset to be able to fetch an instruction.   Reading a value in the flash (stored in val) prior to issuing the   command sequence, then waiting for that read to be the same after    issuing the read/reset, assures the algorithm of not returning unless   the flash device is readable.  Note that I found this ONLY to be necessary   for the signature read command of SGS flash.*/intFLASHTYPE(struct flashinfo *fdev){    int i;    ftype   val;    ushort  man, dev;    val = Read_0000();    /* Issue the autoselect command sequence: */    Write_aa_to_5555();    Write_55_to_2aaa();    Write_90_to_5555();        man = (ushort)Read_0000();  /* manufacturer ID */    dev = (ushort)Read_0001();  /* device ID */    man &= 0xff;    dev &= 0xff;    man <<=8;    dev |= man;    fdev->id = (ushort)dev;    /* Issue the read/reset command sequence: */    Write_aa_to_5555();    Write_55_to_2aaa();    Write_f0_to_5555();    /* The SGS29040 seems to need this, and it doesn't hurt anything */    /* when using the AMD parts... */    for(i=0;i<FLASH_TIMEOUT;i++) {        if (val == Read_0000())            break;    }    return((int)(fdev->id));}/* EndFlashtype():    Function place holder to determine the "end" of the    Flashtype() function.*/voidENDFLASHTYPE(){}#endif

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区三区三区| 亚洲人一二三区| 国产精品素人视频| 亚洲欧美二区三区| 三级精品在线观看| 国产精品资源网站| 日本久久一区二区三区| 欧美本精品男人aⅴ天堂| 中文字幕第一区| 亚洲福利电影网| 国模冰冰炮一区二区| 色综合中文综合网| 日韩不卡免费视频| 懂色中文一区二区在线播放| 色8久久精品久久久久久蜜 | 久久国产精品无码网站| 91香蕉视频污在线| 精品国产乱码久久久久久免费| 精品一区二区综合| 色婷婷精品大在线视频| 日韩欧美一区在线观看| 国产精品免费网站在线观看| 日韩电影在线一区| 97久久人人超碰| 精品成人佐山爱一区二区| 一区二区欧美视频| 成人一区二区在线观看| 日韩欧美亚洲国产另类| 亚洲女人的天堂| 国产福利91精品一区| 91精品国产综合久久精品app| 国产精品麻豆99久久久久久| 精品在线观看视频| 欧美日本在线看| 亚洲日本丝袜连裤袜办公室| 国产精品自拍一区| 日韩免费电影一区| 午夜视频久久久久久| 成人avav在线| 久久影音资源网| 热久久久久久久| 欧美性受极品xxxx喷水| 国产欧美一二三区| 美女视频一区二区| 欧美日韩一二三区| 亚洲欧美偷拍卡通变态| 国产精品主播直播| 精品国产伦一区二区三区观看方式 | 一区二区免费视频| 成人丝袜18视频在线观看| 精品久久久久久久久久久久久久久久久| 一区二区三区在线视频观看58 | 欧美激情中文字幕| 国产精品一区在线观看乱码| 日韩视频一区在线观看| 五月天亚洲精品| 91黄视频在线观看| 成人免费视频在线观看| 成人高清视频在线| 日本一区二区三区四区| 国产一区在线视频| 精品噜噜噜噜久久久久久久久试看| 日日骚欧美日韩| 欧美女孩性生活视频| 亚洲综合在线视频| 欧美在线视频全部完| 亚洲免费毛片网站| 在线精品视频小说1| 夜夜精品视频一区二区| 91一区二区三区在线播放| 亚洲欧美在线另类| 99精品国产91久久久久久| 亚洲欧洲99久久| 97久久久精品综合88久久| 亚洲精选在线视频| 欧美在线免费观看视频| 亚洲在线观看免费视频| 欧美日韩极品在线观看一区| 午夜欧美视频在线观看| 欧美日韩成人综合| 青草av.久久免费一区| 日韩欧美在线不卡| 国产精品一区不卡| 中文字幕中文字幕在线一区| 99re66热这里只有精品3直播| 亚洲另类中文字| 国产一区999| 亚洲欧洲日韩av| 91成人国产精品| 视频一区国产视频| www国产成人免费观看视频 深夜成人网| 极品少妇xxxx偷拍精品少妇| 久久精品欧美日韩精品| av一区二区三区四区| 亚洲宅男天堂在线观看无病毒| 欧美日韩一区二区在线观看视频| 偷拍一区二区三区| 精品久久久久久久久久久久久久久| 国产精品一区二区久激情瑜伽| 国产精品久久久久久久第一福利 | 亚洲欧美日韩久久| 欧美三级中文字幕在线观看| 秋霞影院一区二区| 久久精品一区二区三区不卡牛牛| 成人av网址在线| 午夜伊人狠狠久久| 精品国产电影一区二区| 99视频一区二区| 天天操天天色综合| 国产亚洲综合av| 色8久久人人97超碰香蕉987| 日本 国产 欧美色综合| 国产欧美日韩综合精品一区二区 | 亚洲成人av一区| 欧美mv和日韩mv国产网站| 9久草视频在线视频精品| 五月开心婷婷久久| 国产日韩欧美一区二区三区综合 | 亚洲成av人片在线观看无码| 精品99999| 91国偷自产一区二区三区成为亚洲经典 | 国产伦精品一区二区三区视频青涩| 亚洲国产高清在线| 欧美欧美欧美欧美首页| 懂色av一区二区三区免费观看| 亚洲图片激情小说| 精品成人一区二区三区四区| 在线精品视频小说1| 国产精品自拍av| 午夜av一区二区三区| 国产精品妹子av| 欧美一级国产精品| 99久久久久久99| 韩国理伦片一区二区三区在线播放| 亚洲免费看黄网站| 国产嫩草影院久久久久| 在线不卡免费欧美| 一本大道久久a久久精二百| 国产一区二区精品久久99| 香港成人在线视频| 亚洲欧洲一区二区在线播放| 精品99一区二区| 欧美夫妻性生活| 色激情天天射综合网| 国产成人av福利| 蜜臀久久99精品久久久画质超高清| 亚洲免费大片在线观看| 中文字幕av一区二区三区| 精品国产一二三| 制服丝袜在线91| 欧美亚洲动漫另类| av在线不卡网| 国产高清精品久久久久| 久久99久久久久久久久久久| 亚洲国产欧美在线人成| 亚洲欧洲国产日韩| 日本一区二区三区四区在线视频| 日韩精品中文字幕在线一区| 欧美精品一卡二卡| 日本韩国欧美在线| 99re视频精品| www.久久久久久久久| 国产成人av影院| 国产精品综合一区二区| 久久成人久久爱| 久久福利视频一区二区| 美女任你摸久久| 日韩影院精彩在线| 午夜精品久久久久久久久| 一区二区三区成人| 亚洲精品成人少妇| 亚洲欧美日韩国产综合在线| 最新成人av在线| 中文字幕制服丝袜成人av| 久久精品夜色噜噜亚洲aⅴ| 精品成人免费观看| 久久亚洲欧美国产精品乐播 | 粗大黑人巨茎大战欧美成人| 激情综合网激情| 国产乱理伦片在线观看夜一区| 久久国产三级精品| 精品一区精品二区高清| 韩国一区二区视频| 国产成人亚洲精品狼色在线| 国产一区二区三区香蕉| 国产福利精品导航| 成人中文字幕合集| 99久久精品免费看国产 | 亚洲视频一区二区在线| 综合自拍亚洲综合图不卡区| 国产精品初高中害羞小美女文| 国产精品看片你懂得| 亚洲视频一区在线观看| 亚洲永久免费av| 午夜精品久久久久久久蜜桃app| 日韩成人午夜电影| 黄色日韩三级电影| 粉嫩久久99精品久久久久久夜| 99在线热播精品免费| 欧洲色大大久久|