?? uart.c.bak
字號:
#include "includes.h"
//#include <cs8900.h>
//#include <gzsd2410.h>
#include "isa.h"
#define uint unsigned int
//#define u8 unsigned char
#define ISA_Base_Addr 0x20000000 //nGCS4
#define CS8900_BASE 0x19000300
typedef signed char s8;
typedef unsigned char u8;
typedef signed short s16;
typedef unsigned short u16;
/***************************************************************************
描述:ISA 基本定義
****************************************************************************/
//#define ISA_BASE 0x20000000 //ISA 基本地址
//#define UARTA_BASE_OFFSET 0x3f8
//#define UARTB_BASE_OFFSET 0x2f8
//#define CS8900_PDATA *(volatile CS8900_REG *)(CS8900_BASE+0x03)
union Idnumspace {unsigned int id;
unsigned char idnum[4];
}Pnum;
/*
void delay_dl(unsigned int count)
{unsigned char index;
unsigned char j;
for(index=0;index<count;index++)
{for(j=0;j<100;j++)
{;
}
}
} */
int Main()
{ //uchar ID-l;
//uchar ID-h;
unsigned int id;
// unsigned int tempsize;
// unsigned char index;
u8 count=5;
// u8 *str;
Port_Init();
Uart_Port_Set();
Uart_Init(0,115200);
Uart_Select(1);
// eFunctionEnter();
// ISA_EFER_ADD=0x07;
// SelectDev(2);
// ISA_EFER_ADD=0x20;
while(count--)//
{
//eFunctionEnter();
//ISA_EFDR=0xcc;
//Delay(5);
//delay_dl(100);
//ISA_EFDR=0xcc;
//delay_dl(100);
Delay(5);
id=ReadIsa(0x20);
//Uart_SendByte(ISA_EFER_ADD);
Uart_SendByte(id);
Delay(5);
}
while(1);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -