2009-01-14 13:30:51 -06:00
|
|
|
/***************************************************************************
|
2009-01-15 14:58:17 -06:00
|
|
|
* Copyright (C) 2009 by Alan Carvalho de Assis *
|
2009-01-14 13:30:51 -06:00
|
|
|
* acassis@gmail.com *
|
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU General Public License *
|
|
|
|
* along with this program; if not, write to the *
|
|
|
|
* Free Software Foundation, Inc., *
|
2013-06-02 14:32:36 -05:00
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
|
2009-01-14 13:30:51 -06:00
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
void delay()
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
for (i = 0; i < 500000; i++);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* MAIN ARM FUNTION */
|
2009-06-23 17:50:08 -05:00
|
|
|
int main (void)
|
2009-01-14 13:30:51 -06:00
|
|
|
{
|
|
|
|
volatile unsigned char *led = ((volatile unsigned char *)0xB6020000);
|
2009-06-23 17:50:08 -05:00
|
|
|
|
2009-06-23 17:36:11 -05:00
|
|
|
while (1)
|
2009-01-14 13:30:51 -06:00
|
|
|
{
|
|
|
|
*led = 0xFF;
|
|
|
|
delay();
|
|
|
|
*led = 0x00;
|
|
|
|
delay();
|
|
|
|
} /* FOR */
|
|
|
|
|
|
|
|
} /* MAIN */
|
|
|
|
|
|
|
|
__gccmain()
|
|
|
|
{
|
|
|
|
} /* GCCMAIN */
|
|
|
|
|
|
|
|
|
|
|
|
void exit(int exit_code)
|
|
|
|
{
|
2009-06-23 17:36:11 -05:00
|
|
|
while (1);
|
2009-01-14 13:30:51 -06:00
|
|
|
} /* EXIT */
|
|
|
|
|
|
|
|
|
|
|
|
atexit()
|
|
|
|
{
|
2009-06-23 17:36:11 -05:00
|
|
|
while (1);
|
2009-01-14 13:30:51 -06:00
|
|
|
} /* ATEXIT */
|
|
|
|
|
|
|
|
|