#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
{\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
( 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