⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nor_flash.c

📁 三星公司S3c2443的测试程序源码
💻 C
字号:
/*======================================================================

 Project Name : S3C2443 verification project

 Copyright 2006 by Samsung Electronics, Inc.
 All rights reserved.

 Project Description :
 This software is only for verifying functions of the S3C2443. 
 Anybody can use this code without our permission.

 File Name    : NOR_Flash.c
 Description  : NOR Flash memory access module using 
                Static Memory Controller of S3C2443
 Author       : Junon Jeon
 Dept         : AP
 Created Date : 2006.06.02
 Version      : 0.0
 History
   R0.0 (2006.06.02): Junon draft
		- This code is derived from flash.c of S3C2413A test code.
		
=======================================================================*/

#include <stdio.h>
#include <string.h>
#include "option.h"
#include "2443addr.h"
#include "Console.h"

#include "MMUCache.h"
#include "NOR_Flash.h"
#include "am29f800.h"
#include "strata16.h"


void *flashType[][2]=
{
	//  						"12345678901234567890"
    (void *)ProgramAM29F800,	"Program AM29LV800B  ",
    (void *)Program28F128J3A,	"Program 28F128J3A   ",    
	(void *)Erase28F128J3A,		"Erase 28F128J3A     ",
    0,0
};


void Test_NOR(void)
{
    int i=0,whichFlash;

    printf("\n[ NOR Flash Memory Writer Ver 0.1 ]\n\n");
    printf("The program buffer : 0x31000000 ~ 0x31ff0000\n");
    
    //MMU_Init();
    ChangeRomCacheStatus(RW_NCNB);
    
    while(1)
    {   //display menu
        printf("%2d:%s", i, flashType[i][1]);
        i++;
        if((int)(flashType[i][0])==0)
        {
            printf("\n");
            break;
        }
        if((i%4)==0) 
		printf("\n");
    }

    printf("Select the type of a flash memory ? ");
    whichFlash = GetIntNum();
    printf("%2d\n", whichFlash);

    if( i<0 || (i>=(sizeof(flashType)/8)) )
        return;
    
    DownloadData();
    
    ( (void (*)(void))(flashType[whichFlash][0]) )();
}


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -