資源簡介
ARM9嵌入式系統開發與實踐(北航)隨書的光盤資料。

代碼片段和文件信息
#include?“def.h“
#include?“2410addr.h“
#include?“config.h“
#include?“board.h“
#include?“utils.h“
#include?“SD_Card.h“
#define?INICLK 400000//300000
#define?NORCLK 20000000
#define?POL 0
#define?INT 1
#define?DMA 2
int?CMD13(void);????//?Send?card?status
int?CMD9(void);
//?Global?variables
int?*Tx_buffer; //128[word]*16[blk]=8192[byte]
int?*Rx_buffer; //128[word]*16[blk]=8192[byte]
volatile?unsigned?int?rd_cnt;
volatile?unsigned?int?wt_cnt;
volatile?unsigned?int?block;
volatile?unsigned?int?TR_end=0;
int?Wide=0;?//?0:1bit?1:4bit
int?MMC=0;??//?0:SD???1:MMC
int??Maker_ID;
char?Product_Name[7];?
int??Serial_Num;
volatile?int?RCA;
static?int?blk_offset;
void?SDI_test(void)
{
????RCA=0;
????MMC=0;
????rGPEUP??=?0xf83f;?????//?The?pull?up
????rGPECON?=?0xaaaaaaaa;
????rSDICSTA?=?0xffff;
????rSDIDSTA?=?0xffff;
????printf(“\n[SDI?test]\n“);
????
????if(!SD_card_init())
return;
????
????TR_Buf_new();
INOM:????
????printf(“How?many?blocks?to?test?(1~8)?\n“);
????block=getch();
????if((block<‘1‘)||(block>‘8‘))
goto?INOM;
block?-=‘0‘;????
printf(“Blocks?=?%d\n“?block);??
blk_offset?=?0x2000;
????//CMD13();????
????
????while(1)?{
???? char?ask;
????
???? printf(“Do?you?want?to?test?write?[y/n]\n“);????
???? ask?=?getch();
???? if(ask==‘y‘)?{
???? Wt_Block();
???? break;
???? }
???? if(ask==‘n‘)
???? break;????
????}
????Rd_Block();
????View_Rx_buf();
????
#ifdef TEST_MMC_STREAM
????if(MMC)
TR_Buf_new();
????
????if(MMC)
????{
Wt_Stream();
Rd_Stream();
View_Rx_buf();
????}
#endif
Card_sel_desel(0); //?Card?deselect
????
???? rSDICARG?=?RCA<<16;
rSDICCON?=?(0x1<<10)|(0x1<<9)|(0x1<<8)|0x4a;
if(Chk_CMDend(10?1))
printf(“CID?=?%x%x%x%x\n“?rSDIRSP0?rSDIRSP1?rSDIRSP2?rSDIRSP3);
else
puts(“Get?cid?fail!\n“);
????if(!CMD9())
printf(“Get?CSD?fail!!!\n“);
????rSDIDCON=0;//tark???
????rSDICSTA=0xffff;
}
void?TR_Buf_new(void)
{
????//--?Tx?&?Rx?Buffer?initialize
????int?i?j;
//????int?start?=?0x03020100;
????Tx_buffer=(int?*)0x31000000;
????j=0;
????for(i=0;i<2048;i++) //128[word]*16[blk]=8192[byte]
*(Tx_buffer+i)=i;
// *(Tx_buffer+i)=0x5555aaaa;
????Flush_Rx_buf();
/*
????for(i=0;i<20;i++){
????????for(j=0;j<128;j++){
Tx_buffer[j+i*128]=start;
if(j?%?64?==?63)?start?=?0x0302010;
else?start?=?start?+?0x04040404;
????????}
????????start?=?0x03020100;
????}
*/
}
void?Flush_Rx_buf(void)
{
????//--?Flushing?Rx?buffer?
????int?i;
????Rx_buffer=(int?*)0x31800000;
????for(i=0;i<2048;i++) //128[word]*16[blk]=8192[byte]
*(Rx_buffer+i)=0;
//????printf(“\n--End?Rx?buffer?flush\n“);
}
void?View_Rx_buf()
{
????//--?Display?Rx?buffer?
????int?ierror=0;
/*
????for(i=0;i<2048;i++)
printf(“RB[%02x]=%x“Rx_buffer[i]);
*/
????Tx_buffer=(int?*)0x31000000;
????Rx_buffer=(int?*)0x31800000;
????printf(“Check?Rx?data\n“);
????for(i=0;i<128*block;i++)
????{
????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????25338??2005-03-15?17:46??ARM9嵌入式系統開發與實踐(北航)\demo\SD_Card.c
?????文件?????157330??2005-05-14?18:27??ARM9嵌入式系統開發與實踐(北航)\demo\uCOSII_no\UCOSII.mcp
?????文件???????8563??2004-06-06?19:10??ARM9嵌入式系統開發與實踐(北航)\demo\uCOSII_no\UCOS_II\OS_CFG.H
?????文件??????68253??2005-05-14?16:32??ARM9嵌入式系統開發與實踐(北航)\demo\uCOSII_no\UCOS_II\OS_CORE.C
?????文件??????10323??2003-12-20?17:15??ARM9嵌入式系統開發與實踐(北航)\demo\uCOSII_no\UCOS_II\OS_DBG.C
?????文件??????54008??2003-12-20?17:14??ARM9嵌入式系統開發與實踐(北航)\demo\uCOSII_no\UCOS_II\OS_FLAG.C
?????文件??????25351??2003-12-20?17:15??ARM9嵌入式系統開發與實踐(北航)\demo\uCOSII_no\UCOS_II\OS_MBOX.C
?????文件??????18700??2003-12-20?17:15??ARM9嵌入式系統開發與實踐(北航)\demo\uCOSII_no\UCOS_II\OS_MEM.C
?????文件??????29981??2003-12-20?17:15??ARM9嵌入式系統開發與實踐(北航)\demo\uCOSII_no\UCOS_II\OS_MUTEX.C
?????文件??????37340??2003-12-20?17:15??ARM9嵌入式系統開發與實踐(北航)\demo\uCOSII_no\UCOS_II\OS_Q.C
?????文件??????23622??2004-02-03?21:45??ARM9嵌入式系統開發與實踐(北航)\demo\uCOSII_no\UCOS_II\OS_SEM.C
?????文件??????49686??2004-02-03?17:37??ARM9嵌入式系統開發與實踐(北航)\demo\uCOSII_no\UCOS_II\OS_TASK.C
?????文件??????11032??2003-12-20?17:15??ARM9嵌入式系統開發與實踐(北航)\demo\uCOSII_no\UCOS_II\OS_TIME.C
?????文件???????1050??2004-06-06?09:54??ARM9嵌入式系統開發與實踐(北航)\demo\uCOSII_no\UCOS_II\UCOS_II.C
?????文件??????52261??2004-01-15?08:00??ARM9嵌入式系統開發與實踐(北航)\demo\uCOSII_no\UCOS_II\UCOS_II.H
?????文件???????4039??2005-05-14?16:29??ARM9嵌入式系統開發與實踐(北航)\demo\uCOSII_no\UCOS_II\Target\OS_CPU.H
?????文件???????9421??2005-05-14?18:03??ARM9嵌入式系統開發與實踐(北航)\demo\uCOSII_no\UCOS_II\Target\OS_CPU_A.S
?????文件???????9138??2005-05-13?16:53??ARM9嵌入式系統開發與實踐(北航)\demo\uCOSII_no\UCOS_II\Target\OS_CPU_A.S.bak
?????文件??????10055??2005-05-14?15:39??ARM9嵌入式系統開發與實踐(北航)\demo\uCOSII_no\UCOS_II\Target\OS_CPU_C.C
?????文件???????6422??2005-05-14?09:11??ARM9嵌入式系統開發與實踐(北航)\demo\uCOSII_no\UCOS_II\Target\Target.c
?????文件????????935??2005-05-14?09:06??ARM9嵌入式系統開發與實踐(北航)\demo\uCOSII_no\UCOS_II\Target\Target.h
?????目錄??????????0??2010-01-04?14:17??ARM9嵌入式系統開發與實踐(北航)\demo\uCOSII_no\UCOS_II\Target
?????目錄??????????0??2010-01-04?14:17??ARM9嵌入式系統開發與實踐(北航)\demo\uCOSII_no\UCOS_II
?????文件???????5053??2008-07-07?21:16??ARM9嵌入式系統開發與實踐(北航)\demo\uCOSII_no\Src\Main.c
?????文件???????2721??2008-07-07?21:15??ARM9嵌入式系統開發與實踐(北航)\demo\uCOSII_no\Src\Rtc.c
?????文件???????8509??2005-03-21?17:46??ARM9嵌入式系統開發與實踐(北航)\demo\uCOSII_no\Src\SysInit.s
?????文件??????14283??2005-05-14?16:16??ARM9嵌入式系統開發與實踐(北航)\demo\uCOSII_no\Src\control.c
?????文件???????3010??2005-03-19?12:05??ARM9嵌入式系統開發與實踐(北航)\demo\uCOSII_no\Src\mmu.c
?????文件???????7152??2004-05-31?12:29??ARM9嵌入式系統開發與實踐(北航)\demo\uCOSII_no\Src\slib.s
?????文件???????8438??2005-05-13?08:57??ARM9嵌入式系統開發與實踐(北航)\demo\uCOSII_no\Src\utils.c
............此處省略773個文件信息
- 上一篇:基本MVC模式的新聞發布管理系統
- 下一篇:Denso電裝采集器Qrkbife
評論
共有 條評論