]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/LEDs.c
Update LPC18xx FreeRTOS+UDP demo to use LPCOpen USB and Ethernet drivers.
[freertos] / FreeRTOS-Plus / Demo / FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC / LEDs.c
index 2f155f66f337532ef89c317fc62b6077f763760e..06e9499da59380223baeccb44ab448ada9344e0a 100644 (file)
@@ -79,9 +79,7 @@
 #include "timers.h"\r
 \r
 /* Library includes. */\r
-#include "lpc18xx_gpio.h"\r
-#include "lpc18xx_scu.h"\r
-#include "lpc18xx_cgu.h"\r
+#include "board.h"\r
 \r
 #define ledTOGGLE_RATE ( 500 / portTICK_RATE_MS )\r
 \r
@@ -102,12 +100,6 @@ void vLEDsInitialise( void )
 {\r
 static xTimerHandle xLEDToggleTimer = NULL;\r
 \r
-       /* Set the LED pin-muxing and configure as output. */\r
-       scu_pinmux( 0x2 , 11, MD_PUP, FUNC0 );\r
-       scu_pinmux( 0x2 , 12, MD_PUP, FUNC0 );\r
-       GPIO_SetDir( ledLED0_PORT, ledLED0_BIT, 1 );\r
-       GPIO_SetDir( ledLED1_PORT, ledLED1_BIT, 1 );\r
-\r
     /* Create the timer used to toggle LED0. */\r
        xLEDToggleTimer = xTimerCreate( ( const int8_t * ) "LEDTmr",    /* Just a text name to associate with the timer, useful for debugging, but not used by the kernel. */\r
                                                                ledTOGGLE_RATE,                                         /* The period of the timer. */\r
@@ -132,15 +124,7 @@ static uint8_t ucState = 0;
        ( void ) xTimer;\r
 \r
        /* Just toggle an LED to show the program is running. */\r
-       if( ucState == 0 )\r
-       {\r
-               GPIO_SetValue( ledLED0_PORT, ledLED0_BIT );\r
-       }\r
-       else\r
-       {\r
-               GPIO_ClearValue( ledLED0_PORT, ledLED0_BIT );\r
-       }\r
-\r
+       Board_LED_Set( ledLED0_PORT, ucState );\r
        ucState = !ucState;\r
 }\r
 \r