URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [uIP_Demo_IAR_ARM7/] [uip/] [main_led] - Rev 583
Compare with Previous | Blame | View Log
// Copyright (c) 2001-2004 Rowley Associates Limited.//// This file may be distributed under the terms of the License Agreement// provided with this software.//// THIS FILE IS PROVIDED AS IS WITH NO WARRANTY OF ANY KIND, INCLUDING THE// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.////////////////////////////////////////////////////////////////////////////////////// Olimex LPC-P1 LED Example//// Description// -----------// This example demonstrates writing to the programmable peripheral interface.//////////////////////////////////////////////////////////////////////////////////#include <targets/LPC210x.h>#define LED_RED (1<<8)#define LED_GREEN (1<<10)#define LED_YELLOW (1<<11)#define LED1 LED_YELLOWstatic voidledInit(){IODIR |= LED1;IOSET = LED1;}static voidledOn(void){IOCLR = LED1;}static voidledOff(void){IOSET = LED1;}voiddelay(int d){for(; d; --d);}intmain(void){MAMCR = 2;ledInit();while (1){ledOn();delay(100000);ledOff();delay(100000);}return 0;}
