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

📄 main.c

📁 优龙板的nand flash驱动程序
💻 C
字号:
#include "def.h"
#include "option.h"
#include "2410addr.h"
#include "2410lib.h"
#include "2410slib.h"
#include "timer.h"
#include "mmu.h"
#define FCLK 200000000
#define HCLK (FCLK/2)
#define PCLK (HCLK/2)
#define UCLK 48000000
#define U32  unsigned int
U32	Console_Uart = 0;
U32	Console_Baud = 115200;
void Isr_Init(void);
//void NandFlashInit (void);
//void NandFlashStatusRep(void);
//void NandFlash_Test( void );
//void K9S1208_Program(void);
void K9S1208_PrintBlock(void);
void K9S1208_Program(void);
void Main (void)
{	MMU_Init();
	SetClockDivider(1, 1);
	SetSysFclk(DFT_FCLK_VAL);       
	Port_Init();
	Isr_Init();
	Uart_Select(Console_Uart);
	Uart_Init(0, Console_Baud);
   
while( 1 )
{
K9S1208_Program();
K9S1208_PrintBlock();
//NandFlashInit(); //NAND FLASH 初始化
//NandFlashStatusRep(); //读取NAND FLASH 的信息
//NandFlash_Test(); //NAND FLASH 实验函数
getch();
}
}

void Isr_Init(void)
{
  //  pISR_UNDEF  = (U32)HaltUndef;
    //pISR_SWI    = (U32)HaltSwi;
    //pISR_PABORT = (U32)HaltPabort;
    //pISR_DABORT = (U32)HaltDabort;
    rINTMOD = 0x0;	  // All=IRQ mode
    rINTMSK = BIT_ALLMSK;	  // All interrupt is masked.        
}

⌨️ 快捷键说明

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