From: richardbarry Date: Sun, 12 May 2013 20:24:42 +0000 (+0000) Subject: Update SmartFustion2 starter kit partest.c. X-Git-Tag: V7.5.0~97 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=235494705ad70b49f0ed46f52b32f7f8da7af5a8;p=freertos Update SmartFustion2 starter kit partest.c. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1893 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/FreeRTOS/Demo/CORTEX_M2S050_Starter_Kit_SoftConsole/RTOSDemo/Blinky-Demo/ReadMe.txt b/FreeRTOS/Demo/CORTEX_M2S050_Starter_Kit_SoftConsole/RTOSDemo/Blinky-Demo/ReadMe.txt deleted file mode 100644 index d19749f35..000000000 --- a/FreeRTOS/Demo/CORTEX_M2S050_Starter_Kit_SoftConsole/RTOSDemo/Blinky-Demo/ReadMe.txt +++ /dev/null @@ -1 +0,0 @@ -Run the CreateProjectDirectoryStructure.bat batch file to populate this directory before building the demo. \ No newline at end of file diff --git a/FreeRTOS/Demo/CORTEX_M2S050_Starter_Kit_SoftConsole/RTOSDemo/ParTest.c b/FreeRTOS/Demo/CORTEX_M2S050_Starter_Kit_SoftConsole/RTOSDemo/ParTest.c index c73dfa076..9119fe591 100644 --- a/FreeRTOS/Demo/CORTEX_M2S050_Starter_Kit_SoftConsole/RTOSDemo/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_M2S050_Starter_Kit_SoftConsole/RTOSDemo/ParTest.c @@ -94,6 +94,8 @@ /* Remember the state of the outputs for easy toggling. */ static unsigned char ucPortState = 0; +static const mss_gpio_id_t ucLEDs[ partstNUM_LEDS ] = { MSS_GPIO_0, MSS_GPIO_1 }; + /*-----------------------------------------------------------*/ void vParTestInitialise( void ) @@ -103,15 +105,10 @@ long x; /* Initialise MSS GPIOs. */ MSS_GPIO_init(); - /* Configure MSS GPIOs. */ - MSS_GPIO_config( MSS_GPIO_0 , MSS_GPIO_OUTPUT_MODE ); - MSS_GPIO_config( MSS_GPIO_1 , MSS_GPIO_OUTPUT_MODE ); - MSS_GPIO_config( MSS_GPIO_2 , MSS_GPIO_OUTPUT_MODE ); - MSS_GPIO_config( MSS_GPIO_3 , MSS_GPIO_OUTPUT_MODE ); - - /* Ensure the LEDs are off to start. */ + /* Ensure the LEDs are outputs and off to start. */ for( x = 0; x < partstNUM_LEDS; x++ ) { + MSS_GPIO_config( ucLEDs[ x ], MSS_GPIO_OUTPUT_MODE ); vParTestSetLED( x, pdFALSE ); } } @@ -123,7 +120,7 @@ void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue ) { taskENTER_CRITICAL(); { - MSS_GPIO_set_output( ( mss_gpio_id_t ) uxLED, xValue ); + MSS_GPIO_set_output( ucLEDs[ uxLED ], xValue ); /* Remember the new output state. */ if( xValue == 0 )