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

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

?? drive_c.txt

?? AMD之FLASH操作代碼[Software Support for AMD 5.0V and 3.0V Flash Memory Devices]
?? TXT
字號:
/************************************************************************/
/*                                                                      */
/*  AMD Flash Memory Drivers                                            */
/*  File name: DRIVE.C                                                  */
/*  Revision:  1.1  5/07/98                                             */
/*                                                                      */
/* Copyright (c) 1998 ADVANCED MICRO DEVICES, INC. All Rights Reserved. */
/* This software is unpublished and contains the trade secrets and      */
/* confidential proprietary information of AMD. Unless otherwise        */
/* provided in the Software Agreement associated herewith, it is        */
/* licensed in confidence "AS IS" and is not to be reproduced in whole  */
/* or part by any means except for backup. Use, duplication, or         */
/* disclosure by the Government is subject to the restrictions in       */
/* paragraph (b) (3) (B) of the Rights in Technical Data and Computer   */
/* Software clause in DFAR 52.227-7013 (a) (Oct 1988).                  */
/* Software owned by                                                    */
/* Advanced Micro Devices, Inc.,                                        */
/* One AMD Place,                                                       */
/* P.O. Box 3453                                                        */
/* Sunnyvale, CA 94088-3453.                                            */
/************************************************************************/
/*  This software constitutes a basic shell of source code for          */
/*  programming all AMD Flash components. AMD                           */
/*  will not be responsible for misuse or illegal use of this           */
/*  software for devices not supported herein. AMD is providing         */
/*  this source code "AS IS" and will not be responsible for            */
/*  issues arising from incorrect user implementation of the            */
/*  source code herein. It is the user's responsibility to              */
/*  properly design-in this source code.                                */
/*                                                                      */ 
/************************************************************************/

#include <stdio.h>
#include <stdlib.h>  /* For randomize function */
#include "flash.h"

void main(void)
{
  byte test;
  byte manuf_id;
  word device_id;
  byte far *str;
  word test2,i;
  dword sec_size=0;
  long count=0;

  printf("Beginning test.....\n\n");

  /* First, poke around the memory map to see what kind of
     flash is installed in the socket...assume a DL800B */

  /* The purpose of init_flash is to perform any system memory
     mapping required, and to set up pointers to those region(s).
     init_flash() also selects the proper sector organization
     table defined in flash.c 
     Note: init_flash() will need to be provided by users of
     the flash.c routines */

  if(!init_flash(AM29DL800B)) {
	 exit(1);
  }

  /* Verify the manufacturer code is indeed 0x01 for AMD */
  manuf_id = flash_get_manuf_code(0);

  switch(manuf_id)
  {
	case AMDPART: printf("AMD Flash found in socket...\n");
   		      break;
	default: printf("Non AMD part found in socket...exiting.\n");
		 exit(1);
		 break;
  }

  /* Poll the device id so that the proper sector layout table
     is used for the device in the socket */

  printf("Polling part for Device ID...");

  /* Retrieve the device ID for this AMD flash part.  All device
     id's are stored in flash.h */

  device_id = flash_get_device_id(0);

  switch(device_id)
  {
	case ID_AM29DL800T: 	printf("found an Am29DL800T\n");
				if(!init_flash(AM29DL800T)) exit(1);
				break;

	case ID_AM29DL800B:  	printf("found an Am29DL800B\n");
				if(!init_flash(AM29DL800B)) exit(1);
				break;

	case ID_AM29LV800T:  	printf("found an Am29LV800T\n");
				if(!init_flash(AM29LV800T)) exit(1);
				break;

	case ID_AM29LV800B:  	printf("found an Am29LV800B\n");
				if(!init_flash(AM29LV800B)) exit(1);
				break;

	case ID_AM29LV160B:  	printf(  "found an Am29LV160B\n");
				if(!init_flash(AM29LV160B)) exit(1);
				break;

	case ID_AM29LV400B:  	printf(  "found an Am29LV400B\n");
				if(!init_flash(AM29LV400B)) exit(1);
				break;

	default: printf("error reading Device ID...exiting.\n");
		 exit(1);
		 break;
  }

  randomize();

  /* flash_get_status uses DQ7, DQ5, and DQ2 polling to get the
     status of the flash.  All status codes are defined in flash.h
     Also note that for the DL parts, status is bank dependent */

  printf("Checking current flash status...flash is ");
  test = flash_get_status(0);
  switch(test)
  {
	 case STATUS_READY: 	printf("[Ready]\n");break;
	 case STATUS_BUSY: 	printf("[Busy]\n");break;
	 case STATUS_ERSUSP: 	printf("[Erase Suspended]\n");break;
	 case STATUS_TIMEOUT: 	printf("[Timed Out]\n");break;
	 default: 		printf("Error!\n"); exit(1);break;
  }

  printf("Performing API tests...\n\n");

  /* flash_sector_erase_int() is the function which erases a single
     sector.  It is different from flash_sector_erase() in that it
     'interrupts' execution of the program until the erase is completed.
     For erasing a sector without pausing use flash_sector_erase(). */

  flash_reset(); /* Quick safe check */

  printf("Erasing sector 8...");
  flash_sector_erase_int(8);
  printf("done.\n");

  printf("Verifying erase...");

  flash_get_sector_size(8, &sec_size); /* Get # of byte */

  /* A simple test which reads every word from the flash, and checks
     to see if every word contains the data 0xFFFF, which indicates
     an erased word. */

  for (count=0 ; count < (sec_size/2); count++) {
	 if(count%2048 == 0)
		printf("."); /*print out some dots to show the program hasn't frozen */
	 if (flash_read_word(8,count) != 0xFFFF) {
		printf("erase not completed sucessfully!\n");
		exit(1);
	 }
  }
  printf("erase successful.\n");

  /* flash_write_word() takes word data and programs it to the flash
     at the indicated offset.  Note that this data must be *word aligned*,
     or else programming errors can result.
     It is also good to check the word for 0xFFFF data before programming. */
  
  printf("Writing a single word [0xABCD]\n");
  flash_write_word(8,0,0xABCD);

  /* flash_read_word() returns a single word of data at the specified
     sector/offset .  Must also be word aligned */
  
  printf("After write(0xABCD): %4x\n", flash_read_word(8,0));

  str = (byte far *) calloc(0x7FFF, sizeof(byte));

  /* Randomize the string with random ASCII characters */
  for(i=0; i<0x7FFF; i++) {
	 str[i] = (byte) (41 + (rand() % 26));
  }

  printf("Erasing sector 9...");
  flash_sector_erase_int(9);
  printf("done.\n");

  /* flash_write_string() is a function to program bulk data from a C
     buffer.  It is a bit faster than looping techniques using
     flash_write_word() because function overhead is eliminated. */
  
  printf("Writing 32 kbyte string...");
  flash_write_string(9,0,str,0x7FFE);

  printf("done.\n\n");

  printf("Testing erase suspend\n");
  printf("Beginning erase...\n");

/* This is an example of flash_sector_erase().  Note that the program will
     simply issue the command, and execution will continue while the
     flash is erasing. */
  
  flash_sector_erase(10);

  /* flash_erase_suspend will suspend an erase in progress.  The application
     can then do any reading of data from that sector, or another sector. */
  
  printf("Suspending erase...");
  flash_erase_suspend(10);
  printf("done.\n");

  /* The current flash status should now be STATUS_ERSUSP */
  printf("Checking current flash status...flash is ");
  test = flash_get_status(10);
  switch(test)
  {
	 case STATUS_READY: printf("[Ready]\n");break;
	 case STATUS_BUSY: printf("[Busy]\n");break;
	 case STATUS_ERSUSP: printf("[Erase Suspended]\n");break;
	 case STATUS_TIMEOUT: printf("[Timed Out]\n");break;
	 default: printf("Error!\n"); exit(1);break;
  }

  /* Now we can resume the erase previously suspended */
  printf("Resuming erase after status check..");
  flash_erase_resume(10);
  printf("done.\n");

  /* Now for a test of unlock bypass mode */
  /* Unlock bypass allows for faster programming of flash data in that
     the number of required bus cycles is cut in half.  The most benefit
     can be realized when programming large amounts of data using
     flash_write_string_ub() */

  printf("Entering unlock bypass mode...\n");
  flash_sector_erase_int(11);
  flash_ub(11); /* Enter unlock bypass mode */

  printf("Programming a string in unlock bypass mode..");
  flash_write_string_ub(11,0,str,0x7FFE);
  printf("done.\n");

  printf("Exiting unlock bypass mode..\n");
  flash_reset_ub();

  flash_reset();

  /* Last thing is a quick loop through all the sectors 
     to check for sector protection. */

  printf("\nVerifying sector protection...\n");

  flash_get_numsectors(&test2);

  printf("This device contains %3i sectors: \n", test2);
  for(i=0; i < test2; i++) {
	 test = flash_sector_protect_verify(i);
	 flash_get_sector_size(i, &size);
	 printf("Verify sector #%2i, size [%-5li]: ",
	          i, size);
	 if (test == 0x01)
		printf("sector is protected[%2i].\n", test);
	 else
		printf("sector is not protected[%2i].\n", test);
	 flash_reset();
  }


  printf("Test drive done!\n");
  free(str);
  exit(0);
}


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
从欧美一区二区三区| 欧美视频你懂的| 久久亚洲影视婷婷| 99精品在线观看视频| 日本大胆欧美人术艺术动态| 国产欧美一区在线| 4438亚洲最大| 99精品黄色片免费大全| 91在线精品一区二区| 色婷婷综合五月| 国产成人综合亚洲91猫咪| 亚洲高清久久久| 亚洲欧美在线观看| 久久精品夜色噜噜亚洲a∨| 欧美日韩aaaaa| 97se狠狠狠综合亚洲狠狠| 色婷婷综合久久久久中文一区二区 | 精品久久久久久无| 99久久99久久精品国产片果冻| 久久99精品久久久久久| 午夜视频久久久久久| 中文字幕视频一区| 亚洲国产中文字幕| 精品一区免费av| 99视频一区二区三区| 国产成人亚洲综合色影视| 99国产精品久久久| 日韩一区二区三区视频在线观看| 在线视频欧美区| 91成人看片片| 色综合久久88色综合天天免费| 欧美日韩一区不卡| 欧美日韩另类一区| 久久一区二区三区四区| 一区二区三区四区不卡视频| 中文字幕一区二区三区在线观看| 亚洲一区免费在线观看| 亚洲激情欧美激情| 亚洲欧美一区二区久久| 中文字幕欧美区| 国产精品久久夜| 亚洲欧美区自拍先锋| 麻豆成人91精品二区三区| 麻豆精品在线观看| 色呦呦国产精品| 久久精品亚洲精品国产欧美| 亚洲 欧美综合在线网络| 午夜欧美电影在线观看| 成人性生交大片免费看视频在线| 欧美日韩在线不卡| 亚洲视频综合在线| 亚洲国产成人91porn| 国产成都精品91一区二区三| 99久久伊人网影院| 精品国产一区二区三区久久影院| 久久精品人人做人人综合| 天堂在线一区二区| 国产一区二区三区在线观看免费| 国产成人精品网址| 日韩一级高清毛片| 婷婷综合在线观看| 欧美影院一区二区| 一区二区久久久| 91在线丨porny丨国产| 国产精品美女一区二区三区| 欧美一级欧美一级在线播放| 久久精品人人爽人人爽| 国产一区视频导航| 欧美色男人天堂| 一区二区三区在线不卡| 成人中文字幕电影| 中文字幕精品在线不卡| 国产一区不卡精品| 国产日韩视频一区二区三区| 黄网站免费久久| 色成年激情久久综合| 亚洲日本一区二区三区| 色综合久久久网| 亚洲一级电影视频| 欧美日韩国产片| 蜜臀av性久久久久蜜臀aⅴ流畅| 欧美一区二区三区免费| 美女视频一区二区三区| 精品蜜桃在线看| 精品一区二区综合| 国产婷婷一区二区| 国产精品综合网| 国产亚洲欧美色| 欧美国产综合色视频| 国产久卡久卡久卡久卡视频精品| 精品国产不卡一区二区三区| 韩国av一区二区三区四区| 2023国产精品| 岛国一区二区三区| 夜夜亚洲天天久久| 91精品婷婷国产综合久久性色| 麻豆精品视频在线观看免费| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 久久精品国产网站| 成人午夜在线免费| 国产免费成人在线视频| 91蜜桃在线免费视频| 国产午夜一区二区三区| 99久久精品99国产精品| 亚洲国产精品尤物yw在线观看| 在线播放国产精品二区一二区四区 | 亚洲美女一区二区三区| 色综合久久久久网| 免费高清视频精品| 69堂国产成人免费视频| 国产精品亚洲一区二区三区在线| 亚洲免费在线播放| 日韩精品中文字幕在线一区| 免费成人你懂的| 中文字幕精品在线不卡| 7777精品伊人久久久大香线蕉的 | 亚洲精品视频在线观看网站| 日韩欧美中文字幕公布| 91在线小视频| 国产精品一区二区久久不卡| 一区二区三区中文在线| 久久久久成人黄色影片| 国产成人精品一区二区三区网站观看| 亚洲乱码中文字幕| 欧美激情艳妇裸体舞| 91精品久久久久久久久99蜜臂| 91亚洲永久精品| 国产美女在线观看一区| 亚洲另类春色国产| 国产一区二区日韩精品| 亚洲欧美激情插 | 欧美日韩一级黄| 日韩综合在线视频| 中文字幕一区视频| 欧美精品一区二区三区蜜桃| 色噜噜狠狠色综合中国| 久久99精品久久久久婷婷| 亚洲一区影音先锋| 中文字幕综合网| 国产午夜精品理论片a级大结局 | 国产精品自拍一区| 青青草精品视频| 亚洲不卡av一区二区三区| 最新中文字幕一区二区三区| 欧美韩日一区二区三区四区| 久久嫩草精品久久久精品一| 欧美成人性福生活免费看| 欧美一区二区视频在线观看2020| 91久久香蕉国产日韩欧美9色| 99久久99久久久精品齐齐| 成人h精品动漫一区二区三区| 欧美日韩视频在线一区二区| 色天天综合色天天久久| 一本大道久久a久久精品综合| jizzjizzjizz欧美| 99国产一区二区三精品乱码| 99re热这里只有精品视频| aa级大片欧美| 一本大道久久a久久综合婷婷| 色综合一个色综合| 久久精品国产色蜜蜜麻豆| 麻豆传媒一区二区三区| 麻豆久久一区二区| 国产精品一区二区在线观看不卡| 国产91丝袜在线观看| 成人免费视频app| aa级大片欧美| 欧美私模裸体表演在线观看| 欧美日韩久久一区| 日韩精品中文字幕在线不卡尤物| 欧美成人三级在线| 中文字幕av一区二区三区免费看| 国产精品久久久久毛片软件| 亚洲精品五月天| 日韩一区欧美二区| 国产剧情在线观看一区二区| 丁香网亚洲国际| 在线免费观看一区| 日韩一区二区在线观看视频播放| 久久伊人蜜桃av一区二区| 日韩伦理av电影| 日本亚洲三级在线| 不卡视频一二三| 欧美二区三区的天堂| 欧美国产一区在线| 亚洲国产精品自拍| 国产精品一级二级三级| 91麻豆精品视频| 欧美zozo另类异族| 亚洲欧美一区二区三区极速播放| 日韩黄色在线观看| 成人做爰69片免费看网站| 欧美性生活大片视频| 久久婷婷国产综合国色天香| 亚洲精品福利视频网站| 国产一区二区美女诱惑| 日本精品视频一区二区三区| 久久亚洲精精品中文字幕早川悠里| 亚洲人成网站色在线观看| 久久er99精品|