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

📄 main.c

📁 this programmer for samsung s s3c2410. it s for ADC
💻 C
字号:
#include "..\common\option.h"
#include "..\common\def.h"
#include "..\common\2410addr.h"
#include "..\common\2410slib.h"
#include "..\common\2410lib.h"
#include "..\common\2410addr.h"
//#include "..\common\k9s1208.h"
#include "..\common\register.h"
#include "..\common\LCD.h"
#include "..\common\LCDlib.h"

#define DOWNLOAD_ADDRESS _RAM_STARTADDRESS
#define BOOT_IMAGE_SIZE 5 
#define MEM_OFFSET    0x01000000

void (*run)(void)=(void (*)(void))(DOWNLOAD_ADDRESS+MEM_OFFSET);
void Port_Init(void);
void Led_Display(int);
void Delay(int);
void _Link(void);

volatile unsigned char *downPt;

void Main(int argc,char **argv)
{
	int i,j;
	char status=0;
	char *p;
	downPt=(unsigned char *)(DOWNLOAD_ADDRESS+MEM_OFFSET);

	MMU_DisableICache();
	MMU_DisableDCache();

	ChangeClockDivider(1,1);	    // 1:2:4
	ChangeMPllValue(M_MDIV,M_PDIV,M_SDIV);  //Fin=12MHz FCLK=200MHz
	Port_Init();
	Uart_Select(0);
	Uart_Init(PCLK, 115200);

    //_Link();
    
	Test_Adc();

	/*********************************************************
	 *  on(led1) -> on(led2) -> on(led3) -> on(led4)
	 ********************************************************/
	Embest();
	Uart_SendString("\n\n S3C2410 Test in Embest IDE for ARM toolkets. \n");
	Uart_SendString(  "  UART Send OK! \n ");



    while(1)
     {
       if(status<5) status +=1;
       else status =1;
       Led_Display(status);
       for(i=0;i<55500;i++)
        {;}
       for(i=0;i<55500;i++)
        {;}
        
      }
      
 }

void __gccmain(void)
{
}

⌨️ 快捷键说明

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