rt-thread/bsp/pic32ethernet/application.c
wuyangyong 97e80a164c add PIC32 Ethernet Starter Kit demo
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1433 bbd45198-f89e-11dd-88c7-29a3b14d5316
2011-05-24 02:27:03 +00:00

51 lines
1.0 KiB
C

/*
* File : application.c
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2009 - 2011, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
*
* Change Logs:
* Date Author Notes
* 2011-05-23 aozima first implementation for PIC32.
*/
// Adds support for PIC32 Peripheral library functions and macros
#include <plib.h>
static void delay(void)
{
volatile unsigned long i;
for(i=0;i<500000;i++);
}
int rt_application_init(void)
{
PORTSetPinsDigitalOut(IOPORT_D, BIT_0);
while(1)
{
delay();
delay();
delay();
delay();
delay();
delay();
delay();
delay();
delay();
delay();
delay();
delay();
delay();
delay();
PORTSetBits(IOPORT_D, BIT_0);
delay();
PORTClearBits(IOPORT_D, BIT_0);
}
return 0;
}