OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 636 to Rev 637
    Reverse comparison

Rev 636 → Rev 637

/openrisc/trunk/rtos/freertos-6.1.1/Demo/OpenRISC_SIM_GCC/ParTest/ParTest.c
45,10 → 45,10
 
 
 
#include <avr32/io.h>
#include "FreeRTOS.h"
#include "task.h"
#include "partest.h"
#include "gpio.h"
 
 
/*-----------------------------------------------------------
55,27 → 55,22
* Simple parallel port IO routines.
*-----------------------------------------------------------*/
 
#define partstALL_OUTPUTS_OFF ( ( unsigned portCHAR ) 0x00 )
#if( BOARD==EVK1100 )
# define partstMAX_OUTPUT_LED ( ( unsigned portCHAR ) 8 )
#define partstALL_OUTPUTS_OFF ( ( unsigned portCHAR ) 0x00 )
#define partstMAX_OUTPUT_LED ( ( unsigned portCHAR ) 0x08 )
 
#elif( BOARD==EVK1101 )
# define partstMAX_OUTPUT_LED ( ( unsigned portCHAR ) 4 )
#endif
static volatile unsigned portCHAR ucCurrentOutputValue = partstALL_OUTPUTS_OFF;
 
static volatile unsigned portCHAR ucCurrentOutputValue = partstALL_OUTPUTS_OFF; /*lint !e956 File scope parameters okay here. */
 
/*-----------------------------------------------------------*/
 
void vParTestInitialise( void )
{
LED_Display( partstALL_OUTPUTS_OFF ); /* Start with all LEDs off. */
gpio_write(0, partstALL_OUTPUTS_OFF);
}
/*-----------------------------------------------------------*/
 
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
{
unsigned portCHAR ucBit;
unsigned portCHAR ucBit;
 
if( uxLED >= partstMAX_OUTPUT_LED )
{
95,7 → 90,7
ucCurrentOutputValue &= ~ucBit;
}
 
LED_Display(ucCurrentOutputValue);
gpio_write(0, ucCurrentOutputValue);
}
xTaskResumeAll();
}
103,11 → 98,11
 
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
{
unsigned portCHAR ucBit;
unsigned portCHAR ucBit;
 
if( uxLED >= partstMAX_OUTPUT_LED )
{
return;
if( uxLED >= partstMAX_OUTPUT_LED )
{
return;
}
 
ucBit = ( ( unsigned portCHAR ) 1 ) << uxLED;
115,7 → 110,9
vTaskSuspendAll();
{
ucCurrentOutputValue ^= ucBit;
LED_Display(ucCurrentOutputValue);
gpio_write(0, ucCurrentOutputValue);
}
xTaskResumeAll();
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.