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

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

?? flashpic16.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.*/#include "config.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;#include "cpu.h"#include "flash.h"#include "flash16.h"extern struct flashinfo Fdev;extern int FlashProtectWindow;/* Flasherase():   Based on the 'snum' value, erase the appropriate sector(s).   Return 0 if success, else -1.*/Flasherase29F800B_16(fdev,snum)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)) {            register ulong *lp, *lp1;            int noterased;            /* See if the sector is already erased: */            noterased = 0;            lp = (ulong *)fdev->sectors[sector].begin;             lp1 = (ulong *)((char *)lp + fdev->sectors[sector].size);             while(lp < lp1) {                if (*lp++ != 0xffffffff) {                    noterased = 1;                    break;                }            }            if (noterased) {                /* Issue the sector erase command sequence: */                Write_aa_to_555();                Write_55_to_2aa();                Write_80_to_555();                Write_aa_to_555();                Write_55_to_2aa();                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_f0_to_555();        val = Read_5555();    }    return(ret);}/* EndFlasherase():   Function place holder to determine the "end" of the   sectorerase() function.*/voidEndFlasherase29F800B_16(){}/* Flashwrite():   Return 0 if successful, else -1.*/Flashwrite29F800B_16(fdev,dest,src,bytecnt)struct  flashinfo *fdev;uchar   *src, *dest;long    bytecnt;{    int     i, ret;    long    cnt;    uchar   *src1;    ftype   val;    /* If destination address is not properly aligned, then build a fake   */    /* source buffer based on the current value in dest[-1] and src[0].    */    /* Then call this function to do that 2-byte operation.  Once that     */    /* completes, simply increment dest and src by 1 and continue in this  */    /* context. */    if (NotAligned(dest)) {        uchar buf[2];        buf[0] = *(dest-1);        buf[1] = *src;        Flashwrite29F800B_16(fdev,dest-1,buf,2);        dest++; src++; bytecnt--;    }    /* Each pass through this loop writes 'fdev->width' bytes... */    ret = 0;    cnt = bytecnt & ~1;    src1 = (uchar *)&val;onemore:    for (i=0;i<cnt;i+=fdev->width) {        /* Flash write command */        Write_aa_to_555();        Write_55_to_2aa();        Write_a0_to_555();                /* Just in case src is not aligned... */        src1[0] = src[0];        src1[1] = src[1];        /* Write the value */        Fwrite(dest,src1);        /* Wait for write to complete or timeout. */        while(1) {            if (Is_Equal(dest,src1)) {                if (Is_Equal(dest,src1))                    break;            }            /* Check D5 for timeout... */            if (D5_Timeout(dest)) {                if (Is_Not_Equal(dest,src1))                    ret = -1;                goto done;            }        }        dest += fdev->width;         src += fdev->width;    }    /* If bytecount was odd... */    /* If cnt != bytecnt then bytecnt is odd, so one more byte must be */    /* written to flash.  To do this, the one byte must be combined with */    /* the next byte that is already stored in flash; then re-written... */    if (cnt != bytecnt) {        val = (ftype)*dest | ((ftype)(*src) << 8);        src = (uchar *)&val;        bytecnt = cnt = 1;        goto onemore;    }done:    /* Read/reset command: */    Write_f0_to_555();    val = Read_5555();    return(ret);}/* EndFlashwrite():    Function place holder to determine the "end" of the    Flashwrite() function.*/voidEndFlashwrite29F800B_16(){}/* 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.*/Flashewrite29F800B_16(fdev,dest,src,bytecnt)struct  flashinfo *fdev;ftype   *src, *dest;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_555();        Write_55_to_2aa();        Write_80_to_555();        Write_aa_to_555();        Write_55_to_2aa();        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 = RESETFUNC();                reset();            }        }        add += fdev->sectors[i].size;    }    /* Read/reset command: */    Write_f0_to_555();    val = Read_5555();    for(i=0;i<bytecnt;i+=fdev->width) {        /* Write command: */        Write_aa_to_555();        Write_55_to_2aa();        Write_a0_to_555();        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_f0_to_555();    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 = RESETFUNC();    reset();    return(0);  /* won't get here */}/* EndFlashewrite():    Function place holder to determine the "end" of the    FlashEraseAndWrite() function.*/voidEndFlashewrite29F800B_16(){}/* Flashtype():   Use the AUTOSELECT command sequence to determine the type of device.*/intFlashtype29F800B_16(fdev)struct flashinfo *fdev;{    int i;    ftype   val;    ushort  man, dev;    ulong   id;    val = Read_0000();    /* Issue the autoselect command sequence: */    Write_aa_to_555();    Write_55_to_2aa();    Write_90_to_555();    man = (ushort)Read_0000();  /* manufacturer ID */    dev = (ushort)Read_0001();  /* device ID */    id = man;    id <<= 16;    id |= dev;    fdev->id = id;    /* Issue the read/reset command sequence: */    Write_f0_to_555();    val = Read_0000();    return((int)(fdev->id));}/* EndFlashtype():    Function place holder to determine the "end" of the    Flashtype() function.*/voidEndFlashtype29F800B_16(){}#endif

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品久久毛片| 国产一区二区三区久久悠悠色av| 欧美经典三级视频一区二区三区| 日韩一卡二卡三卡国产欧美| 欧美日韩在线三级| 欧美日韩大陆一区二区| 欧美精品在欧美一区二区少妇| 欧美在线你懂的| 国产精品无人区| 中文字幕久久午夜不卡| 国产女人18水真多18精品一级做| 国产亚洲精品aa| 国产精品福利一区| 亚洲裸体xxx| 天堂成人免费av电影一区| 热久久国产精品| 国产在线精品免费| 国产福利一区在线观看| 97久久精品人人做人人爽| 91片黄在线观看| 欧美午夜影院一区| 欧美一区二区三区小说| 久久久亚洲精品石原莉奈| 久久婷婷色综合| 综合在线观看色| 午夜成人免费电影| 精品中文av资源站在线观看| 国产69精品一区二区亚洲孕妇| 91在线精品秘密一区二区| 欧美日韩一本到| 精品毛片乱码1区2区3区| 中文字幕欧美三区| 亚洲午夜在线电影| 美国毛片一区二区三区| 风间由美一区二区三区在线观看| 色拍拍在线精品视频8848| 在线播放中文一区| 国产日产欧美一区二区视频| 亚洲免费观看高清在线观看| 日本不卡的三区四区五区| 国产夫妻精品视频| 欧美日韩在线不卡| 国产亚洲精品资源在线26u| 亚洲卡通动漫在线| 青椒成人免费视频| 99视频精品在线| 欧美一二三区精品| 国产精品不卡一区二区三区| 亚洲chinese男男1069| 国产一区激情在线| 精品视频一区三区九区| 国产亚洲污的网站| 亚洲综合激情网| 国产精品一区二区免费不卡| 亚洲免费观看高清完整| 蜜臀a∨国产成人精品| 色综合久久久久久久久| 欧美www视频| 亚洲高清免费观看| 岛国精品在线观看| 日韩欧美亚洲另类制服综合在线| 亚洲人成网站在线| 久久精品国产久精国产爱| 色网站国产精品| 久久日韩粉嫩一区二区三区 | 欧美国产日本韩| 亚洲va国产天堂va久久en| www.激情成人| 26uuu成人网一区二区三区| 亚洲午夜精品网| www.日本不卡| 国产视频一区在线观看| 免费观看久久久4p| 91福利国产精品| 一色屋精品亚洲香蕉网站| 麻豆91精品视频| 欧美日本一区二区三区四区| 日韩一区有码在线| 国产成人日日夜夜| 久久综合网色—综合色88| 日韩不卡一二三区| 欧美理论片在线| 亚洲一区二区欧美| 91在线视频播放地址| 国产日韩综合av| 国产麻豆精品在线| 日韩欧美一级二级三级| 午夜精品一区二区三区电影天堂| 91福利视频在线| 一区二区日韩av| 一本色道久久综合亚洲aⅴ蜜桃 | 天天影视网天天综合色在线播放| 99久久国产综合精品女不卡| 国产欧美一区二区精品仙草咪| 久久激情五月激情| 欧美变态tickle挠乳网站| 免费高清在线一区| 日韩视频中午一区| 九九热在线视频观看这里只有精品| 欧美一区二区三区影视| 日韩高清国产一区在线| 欧美日韩卡一卡二| 日韩精品久久理论片| 欧美群妇大交群中文字幕| 日韩专区在线视频| 日韩一卡二卡三卡四卡| 精品一区二区久久| 国产偷国产偷精品高清尤物| 成人一区二区三区在线观看| 亚洲国产精品t66y| 91麻豆精品一区二区三区| 亚洲三级在线免费| 在线亚洲一区观看| 午夜精品爽啪视频| 欧美va亚洲va| 国产成人8x视频一区二区| 欧美国产日韩a欧美在线观看| a亚洲天堂av| 亚洲线精品一区二区三区八戒| 欧美精品99久久久**| 精品一区二区国语对白| 欧美国产欧美综合| 91福利精品视频| 欧洲激情一区二区| 秋霞午夜av一区二区三区| 精品久久免费看| 成人白浆超碰人人人人| 亚洲免费色视频| 91精品欧美久久久久久动漫| 九九**精品视频免费播放| 欧美国产综合一区二区| 91丝袜国产在线播放| 午夜精品一区二区三区电影天堂| 欧美成人a∨高清免费观看| 成人va在线观看| 婷婷六月综合亚洲| 国产日韩高清在线| 欧美午夜精品理论片a级按摩| 麻豆成人久久精品二区三区小说| 欧美激情一区二区三区不卡| 在线看日韩精品电影| 久久精品久久精品| 亚洲欧美视频在线观看视频| 91精品国产91热久久久做人人| 国产精品一区三区| 亚洲一级片在线观看| 久久久久国产精品人| 欧美中文字幕一二三区视频| 韩国v欧美v日本v亚洲v| 亚洲人亚洲人成电影网站色| 日韩美一区二区三区| 91色视频在线| 国产揄拍国内精品对白| 亚洲夂夂婷婷色拍ww47| www一区二区| 欧美剧在线免费观看网站| 国产成人精品免费网站| 日韩精品欧美精品| 日韩毛片一二三区| 日韩欧美激情四射| 欧美无砖砖区免费| 成人免费av网站| 奇米影视一区二区三区小说| 亚洲欧美中日韩| 久久先锋影音av鲁色资源网| 欧美系列日韩一区| 不卡的av电影在线观看| 美女网站在线免费欧美精品| 亚洲免费观看高清| 中文字幕不卡在线播放| 欧美mv日韩mv亚洲| 欧美三级电影一区| 99精品欧美一区二区三区小说| 精品午夜一区二区三区在线观看 | 国产精品一区二区免费不卡| 一区二区理论电影在线观看| 国产日韩欧美精品在线| 日韩久久久久久| 欧美日韩精品一区二区三区蜜桃| 成人免费的视频| 国产精品系列在线播放| 日韩av中文字幕一区二区三区| 亚洲自拍与偷拍| 中文字幕五月欧美| 亚洲国产高清在线| 国产片一区二区三区| 精品久久久久久久久久久久包黑料| 欧美四级电影在线观看| 91免费版在线看| 国产校园另类小说区| 欧美一区二区三区视频在线| 欧美午夜精品久久久久久孕妇| 色综合久久久久| 91理论电影在线观看| 成人午夜激情影院| 成人精品鲁一区一区二区| 国产suv精品一区二区883| 国产一区二区日韩精品| 国产一区二区在线观看免费| 国产一区91精品张津瑜|