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

📄 main.c

📁 基于arm7s3c2410开发板的bootloader的设计与实现源代码 采用汇编语言和C语言编写
💻 C
字号:
/*
 *	main.c   - 	 the main file of the bootloader
 *	
 *	Author: 	yu feng <progeryf@gmail.com>
 *	Date:		2007-5-11
 *	Modify:		2007-5-28
 */

#include "snds.h"
#include "uart.h"
#include "led_api.h"
#include "my_printf.h"
#include "shell.h"
#include "command.h"

#define download_addr 0x8000
/*int a = 100;
int b;
int c;*/
void load()
{
	char order;
	int delay = 0;
	/*init the UART and set the baud rate*/ 
	uart_init(UART0_BASE, BAUD_38400);
	
	while(1)
	{
		/*set the led just for testing*/
		led_all_dark();
		led_one_light( 1 );
		led_delay( 1 );
		led_one_light( 3 );
		led_delay( 1 );
	
//		my_printf("\rok %d\n",a);
		/*print the welcome message*/
		my_printf("\r       FREE BOOT \n");
		my_printf("\rif you want know how to use \n");
		my_printf("\rplease input help \n");
		
				/*enter the shell you can load and store the file*/
				shell_command();
				/* if you does't press any in 10 seconds
				 * the uCliunx will be loader
				 */
				flashl();
		
			/* this is a function pointer
			 * jump to the kernel
			 */
				((void (*)(void))(download_addr)) ();
			//my_printf("\rPlease input Y/N");
	}
}

⌨️ 快捷键说明

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