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

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

?? 39vf160.c

?? 39VF160.c Flash的源碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* PROCEDURE:   Erase_One_Block                                         */
/*                                                                      */
/* This procedure can be used to erase a total of 32K words.            */
/*                                                                      */
/* Input:                                                               */
/*      Dst     DESTINATION address which the erase operation starts    */
/*                                                                      */
/* Output:                                                              */
/*      NONE                                                            */
/************************************************************************/

int Erase_One_Block (WORD far *Dst)
{
        WORD far *Temp;

        /*  Issue the Sector Erase command to 39VF160  */

        Temp  = (WORD far *)0xC0005555; /* set up address to be C000:5555h  */
        *Temp = 0xAAAA;                 /* write data 0xAAAA to the address */
        Temp  = (WORD far *)0xC0002AAA; /* set up address to be C000:2AAAh  */
        *Temp = 0x5555;                 /* write data 0x5555 to the address */
        Temp  = (WORD far *)0xC0005555; /* set up address to be C000:5555h  */
        *Temp = 0x8080;                 /* write data 0x8080 to the address */
        Temp  = (WORD far *)0xC0005555; /* set up address to be C000:5555h  */
        *Temp = 0xAAAA;                 /* write data 0xAAAA to the address */
        Temp  = (WORD far *)0xC0002AAA; /* set up address to be C000:2AAAh  */
        *Temp = 0x5555;                 /* write data 0x5555 to the address */

        Temp  = Dst                     /* set up starting address to be erased */
        *Temp = 0x5050;                 /* write data 0x5050 to the address */
        Delay_25_Milli_Seconds();       /* Delay time = Tbe                 */
}

/************************************************************************/
/* PROCEDURE:   Program_One_Word                                        */
/*                                                                      */
/* This procedure can be used to program ONE word of date to the        */
/* 39VF160.                                                             */
/*                                                                      */
/* NOTE:  It is VERY important the sector containing the word to be     */
/*        programmed was ERASED first.                                  */
/*                                                                      */
/* Input:                                                               */
/*           Src     The WORD which will be written to the 39VF160      */
/*           Dst     DESTINATION address which will be written with the */
/*                   data passed in from Src                            */
/*                                                                      */
/* Output:                                                              */
/*           None                                                       */
/************************************************************************/

void Program_One_Word (WORD SrcWord,    WORD far *Dst)
{
        WORD far *SourceBuf;
        WORD far *DestBuf;
        int Index;

        DestBuf = Dst;

        Temp =  (WORD far *)0xC0005555; /* set up address to be C000:555h   */
        *Temp = 0xAAAA;                 /* write data 0xAAAA to the address */
        Temp =  (WORD far *)0xC0002AAA; /* set up address to be C000:2AAAh  */
        *Temp = 0x5555;                 /* write data 0x5555 to the address */
        Temp =  (WORD far *)0xC0005555; /* set up address to be C000:5555h  */
        *Temp = 0xA0A0;                 /* write data 0xA0A0 to the address */
        *DestBuf = SrcWord;             /* transfer the byte to destination */
        Check_Toggle_Ready(DestBuf);    /* wait for TOGGLE bit to get ready */
}


/************************************************************************/
/* PROCEDURE:   Program_One_Sector                                      */
/*                                                                      */
/* This procedure can be used to program a total of 2048 words of data  */
/* to the SST39VF160.                                                   */
/*                                                                      */
/* Input:                                                               */
/*           Src     SOURCE address containing the data which will be   */
/*                   written to the 39VF160                             */
/*           Dst     DESTINATION address which will be written with the */
/*                   data passed in from Src                            */
/*                                                                      */
/* Output:                                                              */
/*           None                                                       */
/************************************************************************/

void Program_One_Sector (WORD far *Src,    WORD far *Dst)
{
        WORD far *Temp;
        WORD far *SourceBuf;
        WORD far *DestBuf;
        int Index;

        SourceBuf = Src;
        DestBuf = Dst;

        Erase_One_Sector(Dst);          /* erase the sector first */

        for (Index = 0; Index < SECTOR_SIZE; Index++)
        {
            Temp =  (WORD far *)0xC0005555; /* set up address to be C000:555h           */
            *Temp = 0xAAAA;                 /* write data 0xAAAA to the address         */
            Temp =  (WORD far *)0xC0002AAA; /* set up address to be C000:2AAAh          */
            *Temp = 0x5555;                 /* write data 0x5555 to the address         */
            Temp =  (WORD far *)0xC0005555; /* set up address to be C000:5555h          */
            *Temp = 0xA0A0;                 /* write data 0xA0A0 to the address         */
            Temp = DestBuf;                 /* save the original Destination address    */
            *DestBuf++ = *SourceBuf++;      /* transfer data from source to destination */
            Check_Toggle_Ready(Temp);       /* wait for TOGGLE bit to get ready         */
        }
}



/************************************************************************/
/* PROCEDURE:   Program_One_Block                                       */
/*                                                                      */
/* This procedure can be used to program a total of 32k words of data   */
/* to the SST39VF160.                                                   */
/*                                                                      */
/* Input:                                                               */
/*           Src     SOURCE address containing the data which will be   */
/*                   written to the 39VF160                             */
/*           Dst     DESTINATION address which will be written with the */
/*                   data passed in from Src                            */
/*                                                                      */
/* Output:                                                              */
/*           None                                                       */
/************************************************************************/

void Program_One_Block (WORD far *Src,    WORD far *Dst)
{
        WORD far *Temp;
        WORD far *SourceBuf;
        WORD far *DestBuf;
        int Index;

        SourceBuf = Src;
        DestBuf = Dst;//dst 寫是地址

        Erase_One_Block(Dst);          /* erase the sector first */

        for (Index = 0; Index < BLOCK_SIZE; Index++)
        {
            Temp =  (WORD far *)0xC0005555; /* set up address to be C000:555h           */
            *Temp = 0xAAAA;                 /* write data 0xAAAA to the address         */
            Temp =  (WORD far *)0xC0002AAA; /* set up address to be C000:2AAAh          */
            *Temp = 0x5555;                 /* write data 0x5555 to the address         */
            Temp =  (WORD far *)0xC0005555; /* set up address to be C000:5555h          */
            *Temp = 0xA0A0;                 /* write data 0xA0A0 to the address         */
            Temp = DestBuf;                 /* save the original Destination address    */
            *DestBuf++ = *SourceBuf++;      /* transfer data from source to destination */
            Check_Toggle_Ready(Temp);       /* wait for TOGGLE bit to get ready         */
        }
}


/************************************************************************/
/* PROCEDURE:    Check_Toggle_Ready                                     */
/*                                                                      */
/* During the internal program cycle, any consecutive read operation    */
/* on DQ6 will produce alternating 0's and 1's (i.e. toggling between   */
/* 0 and 1). When the program cycle is completed, DQ6 of the data will  */
/* stop toggling. After the DQ6 data bit stops toggling, the device is  */
/* ready for next operation.                                            */
/*                                                                      */
/* Input:                                                               */
/*           Dst        must already set-up by the caller               */
/*                                                                      */
/* Output:                                                              */
/*           None                                                       */
/************************************************************************/

void Check_Toggle_Ready (WORD far  *Dst)
{
        BYTE Loop = TRUE;
        WORD PreData;
        WORD CurrData;
        unsigned long TimeOut = 0;

        PreData = *Dst;
        PreData = PreData & 0x4040;
        while ((TimeOut< 0x07FFFFFF) && (Loop))
        {
            CurrData = *Dst;//讀回數(shù)據(jù)
            CurrData = CurrData & 0x4040; //比較D6位的值,如果兩次讀回來一樣,那么就是對的。
            if (PreData == CurrData)		//如果和寫之前一樣,表示可以退出循環(huán)。
            {
                    Loop = FALSE;   /* ready to exit the while loop */
            }
            PreData = CurrData;
            TimeOut++;
        }
}


/************************************************************************/
/* PROCEDURE:   Check_Data_Polling                                      */
/*                                                                      */
/* During the internal program cycle, any attempt to read DQ7 of the    */
/* last byte loaded during the page/byte-load cycle will receive the    */
/* complement of the true data.  Once the program cycle is completed,   */
/* DQ7 will show true data.                                             */
/*                                                                      */
/* Input:                                                               */
/*           Dst        must already set-up by the caller               */
/*           True       Data is the original (true) data                */
/*                                                                      */
/* Output:                                                              */
/*           None                                                       */
/************************************************************************/

void Check_Data_Polling (WORD far  *Dst,       WORD TrueData)
{
        BYTE Loop = TRUE;
        WORD CurrData;
        unsigned long TimeOut = 0;

        TrueData = TrueData &  0x8080;
        while ((TimeOut< 0x07FFFFFF) && (Loop))
        {
                CurrData = *Dst;
                CurrData = CurrData & 0x8080;
                if (TrueData == CurrData)
                        Loop = FALSE;   /* ready to exit the while loop  */
                TimeOut++;
        }
}


?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
18成人在线视频| 91免费视频网| 精品伊人久久久久7777人| 亚欧色一区w666天堂| 国产精品萝li| 亚洲欧洲另类国产综合| 亚洲少妇屁股交4| 亚洲丝袜精品丝袜在线| 亚洲日本成人在线观看| 亚洲美女视频在线观看| 亚洲一级电影视频| 婷婷六月综合网| 日韩国产精品91| 韩国一区二区在线观看| 国产一区二区三区免费看| 国产成人8x视频一区二区| 北岛玲一区二区三区四区| 波多野结衣视频一区| 91黄色免费版| 欧美丰满嫩嫩电影| 精品日韩一区二区三区| 国产欧美精品国产国产专区| 国产精品视频在线看| 国产精品久久久久一区二区三区| 97久久超碰国产精品| 欧亚一区二区三区| 欧美一区二区三区小说| 26uuu国产一区二区三区| 国产精品久99| 一区二区成人在线视频| 日韩精品免费视频人成| 精品一区二区精品| av爱爱亚洲一区| 在线不卡a资源高清| 久久综合九色综合97婷婷| 专区另类欧美日韩| 日韩国产精品91| 成人永久aaa| 欧美日韩国产天堂| 久久久午夜电影| 亚洲一区二区视频在线观看| 蜜桃久久久久久| 不卡一区二区三区四区| 欧美日韩精品欧美日韩精品一综合| 97久久精品人人做人人爽50路 | 精品制服美女丁香| 丁香婷婷综合五月| 欧美情侣在线播放| 中文字幕欧美激情| 日韩国产高清在线| 97精品久久久久中文字幕| 日韩一区二区高清| 最近中文字幕一区二区三区| 蜜臀av性久久久久蜜臀aⅴ| 不卡电影一区二区三区| 欧美久久久影院| 国产精品久久久久久久蜜臀| 三级在线观看一区二区| 不卡视频一二三| 精品精品欲导航| 亚洲一区二区综合| 国产福利一区二区| 日韩欧美在线影院| 亚洲欧美国产77777| 国产综合久久久久影院| 欧美亚洲精品一区| 中文字幕av一区二区三区| 蜜臀久久99精品久久久久宅男| 蜜臀av性久久久久av蜜臀妖精| 日本午夜一本久久久综合| www.亚洲色图.com| 久久久国产综合精品女国产盗摄| 国产欧美中文在线| 免费人成网站在线观看欧美高清| 极品少妇一区二区三区精品视频| 久久国产成人午夜av影院| 欧美最猛性xxxxx直播| 国产亚洲欧美日韩日本| 香蕉成人伊视频在线观看| 91丝袜高跟美女视频| 久久综合色婷婷| 久久精品国产免费| 欧美女孩性生活视频| 一区二区三区在线观看网站| 粉嫩久久99精品久久久久久夜| 91片黄在线观看| 国产精品乱人伦一区二区| 国产一区二区三区香蕉| 日韩精品一区二区三区在线观看 | 久久先锋影音av鲁色资源网| 日欧美一区二区| 欧美年轻男男videosbes| 亚洲一区中文日韩| 在线观看av不卡| 亚洲免费资源在线播放| 久久久久久97三级| 久久99精品久久久久婷婷| 欧美色成人综合| 日韩一区日韩二区| 一道本成人在线| 亚洲精品乱码久久久久久| 色综合夜色一区| 亚洲另类春色国产| 欧美中文字幕不卡| 亚洲444eee在线观看| 欧美日本一区二区三区四区| 偷偷要91色婷婷| 欧美久久一区二区| 麻豆精品久久久| 欧美电影免费观看完整版| 极品少妇一区二区| 国产欧美日韩在线视频| 不卡高清视频专区| 亚洲日本成人在线观看| 欧美性受xxxx| 午夜精品一区在线观看| 7777精品伊人久久久大香线蕉超级流畅 | 56国语精品自产拍在线观看| 亚洲成精国产精品女| 欧美一区二区三区在线| 精品亚洲porn| 久久综合视频网| 成人午夜激情片| 一区二区三区精品视频在线| 在线不卡欧美精品一区二区三区| 亚洲欧洲成人自拍| 欧美午夜宅男影院| 玖玖九九国产精品| 久久久久久久电影| 99久久99久久精品免费看蜜桃| 欧美精品一区二区三区四区 | 亚洲人成网站色在线观看| 欧美中文一区二区三区| 午夜精品爽啪视频| 欧美大胆人体bbbb| 成人免费黄色大片| 亚洲福利一二三区| 日韩欧美一区电影| 成人综合婷婷国产精品久久| 艳妇臀荡乳欲伦亚洲一区| 日韩三区在线观看| av激情综合网| 男女激情视频一区| 国产精品福利影院| 91精品国产乱| 不卡在线视频中文字幕| 午夜久久电影网| 国产欧美日韩亚州综合 | 91香蕉国产在线观看软件| 日韩高清一区二区| 国产精品污www在线观看| 欧美色图天堂网| 国产精品 日产精品 欧美精品| 日韩一卡二卡三卡国产欧美| 国产91精品一区二区麻豆网站| 精品精品国产高清一毛片一天堂| 日本视频在线一区| 国产精品视频一二三区| 欧美色图片你懂的| 成人亚洲一区二区一| 日本不卡一区二区| 国产精品国产三级国产a| 欧美日韩国产另类一区| 成人av资源站| 免费在线成人网| 玉米视频成人免费看| 久久久久国产精品厨房| 欧美老女人在线| 99久久夜色精品国产网站| 久久99九九99精品| 午夜伊人狠狠久久| 亚洲毛片av在线| 欧美国产禁国产网站cc| 日韩精品一区二区在线| 欧美日韩一区二区在线观看| 成人高清视频在线观看| 国产一区中文字幕| 石原莉奈在线亚洲二区| 亚洲黄色尤物视频| 国产精品免费观看视频| 精品国产91洋老外米糕| 欧美高清视频www夜色资源网| 美女一区二区三区在线观看| 亚洲综合丝袜美腿| 国产精品久久久久久久久果冻传媒| 91性感美女视频| 国v精品久久久网| 国产在线精品一区二区夜色| 午夜亚洲国产au精品一区二区| 日韩一区二区电影在线| 欧美日韩高清在线| 欧美性大战久久| 91国偷自产一区二区三区成为亚洲经典 | 久久99久久精品欧美| 五月婷婷另类国产| 午夜精品久久久久久久久| 亚洲视频一区在线| 中文字幕一区二区三区在线播放| 欧美日韩精品一区二区三区| 91黄色免费网站|