📄 cf_sample.c
字号:
/*************************************************************************************/
/* */
/* Copyright (C) 2001 Oki Electric Industry Co., LTD. */
/* */
/* System Name : ML674000 */
/* Module Name : Parallel Functions */
/* File Name : pio_sample.c */
/* Revision : 1.00 */
/* Date : 2001/01/24 */
/* Initial version */
/* */
/*************************************************************************************/
#include "ML674001.h"
const char dingf[]="DingFei debug CF Card interface. 2005-03-05";
int main(void)
{
char k,t,*p;
unsigned char Buffer[512];
volatile unsigned char n=0;
unsigned char i=0x00;
*((volatile unsigned int*)BWC)=0x68;
/*******************************************/
ATA_INI();
n=ATA_ReadSector(0,Buffer,1,1);
strcpy(Buffer,dingf);
n=ATA_WriteSector(0,Buffer,1,1);
for(i=0;i<20;i++)
n=ATA_ReadSector(0,Buffer,i,1);
n++;
/********dingf050305:signal test************/
p=(char*)0xf0000000;
for(k=0;k<0xffffff;k++)
{
//dely();
*p++=0;
(volatile unsigned int)t=*p;
//dely();
*p=0xffff;
}
/*******************************************/
return(0);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -