1/******************************************************************************* 2 * 3 * Filename: main.c 4 * 5 * Basic entry points for top-level functions 6 * 7 * Revision information: 8 * 9 * 20AUG2004 kb_admin initial creation 10 * 12JAN2005 kb_admin cosmetic changes 11 * 29APR2005 kb_admin modified boot delay 12 * 13 * BEGIN_KBDD_BLOCK 14 * No warranty, expressed or implied, is included with this software. It is 15 * provided "AS IS" and no warranty of any kind including statutory or aspects 16 * relating to merchantability or fitness for any purpose is provided. All 17 * intellectual property rights of others is maintained with the respective 18 * owners. This software is not copyrighted and is intended for reference 19 * only. 20 * END_BLOCK 21 * 22 * $FreeBSD$ 23 ******************************************************************************/ 24 25#include "env_vars.h" 26#include "at91rm9200_lowlevel.h" 27#include "loader_prompt.h" 28#include "emac.h" 29#include "lib.h" 30 31/* 32 * .KB_C_FN_DEFINITION_START 33 * int main(void) 34 * This global function waits at least one second, but not more than two 35 * seconds, for input from the serial port. If no response is recognized, 36 * it acts according to the parameters specified by the environment. For 37 * example, the function might boot an operating system. Do not return 38 * from this function. 39 * .KB_C_FN_DEFINITION_END 40 */ 41int 42main(void) 43{ 44 InitEEPROM(); 45 EMAC_Init(); 46 LoadBootCommands(); 47 printf("\n\rKB9202(www.kwikbyte.com)\n\rAuto boot..\n\r"); 48 if (getc(1) == -1) 49 ExecuteEnvironmentFunctions(); 50 Bootloader(0); 51 52 return (1); 53} 54