Continue work on SmartFusion demo.

This commit is contained in:
Richard Barry 2011-04-11 19:59:12 +00:00
parent ed24f0fdc1
commit 9481ea480b
5 changed files with 165 additions and 26 deletions

View file

@ -111,6 +111,24 @@ void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
}
/*-----------------------------------------------------------*/
void vParTestSetLEDFromISR( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
{
if( uxLED < partstMAX_LEDS )
{
if( xValue == pdTRUE )
{
ulGPIOState &= ~( 1UL << uxLED );
}
else
{
ulGPIOState |= ( 1UL << uxLED );
}
MSS_GPIO_set_outputs( ulGPIOState );
}
}
/*-----------------------------------------------------------*/
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
{
if( uxLED < partstMAX_LEDS )
@ -119,7 +137,7 @@ void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
interrupt. */
taskENTER_CRITICAL();
{
if( ( ulGPIOState & ( 1UL << uxLED ) != 0UL )
if( ( ulGPIOState & ( 1UL << uxLED ) ) != 0UL )
{
ulGPIOState &= ~( 1UL << uxLED );
}