Respected Madam,
I am using Code Warrior and hence the package doesnot have the necessary API.. In order to just give an idea, I am pasting on the codes to blink the LED.. I need an API pdf which could help me to understand the codes. These codes I got from vendors as test codes so I dont have hyperlink of downloadable link
#include "Cpu.h"
#include "Events.h"
#include "LED1.h"
#include "LED_2.h"
#include "LED_3.h"
#include "LED_4.h"
/* Including shared modules, which are used for whole project */
#include "PE_Types.h"
#include "PE_Error.h"
#include "PE_Const.h"
#include "IO_Map.h"
/* User includes (#include below this line is not maintained by Processor Expert) */
/*lint -save -e970 Disable MISRA rule (6.3) checking. */
int main(void)
/*lint -restore Enable MISRA rule (6.3) checking. */
{
/* Write your local variable definition here */
void *LED1_UData=NULL;
void *LED1_DData;
void *LED_2_UData=NULL;
void *LED_2_DData;
void *LED_3_UData=NULL;
void *LED_3_DData;
void *LED_4_UData=NULL;
void *LED_4_DData;
int i=0;
/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
PE_low_level_init();
LED1_DData = LED1_Init(LED1_UData);
LED_2_DData = LED_2_Init(LED_2_UData);
LED_3_DData = LED_3_Init(LED_3_UData);
LED_4_DData = LED_4_Init(LED_4_UData);
if(LED1_DData == NULL || LED_2_DData == NULL || LED_3_DData == NULL || LED_4_DData == NULL)
{
while(1);
}
for (;;)
{
LED1_PutVal(LED1_DData, 1);
LED_2_PutVal(LED_2_DData, 1);
LED_3_PutVal(LED_3_DData, 0);
LED_4_PutVal(LED_4_DData, 0);
for(i=0;i<=500000;i++);
LED1_PutVal(LED1_DData, 0);
LED_2_PutVal(LED_2_DData, 0);
LED_3_PutVal(LED_3_DData, 1);
LED_4_PutVal(LED_4_DData, 1);
for(i=0;i<=500000;i++);
}
/*** Don't write any code pass this line, or it will be deleted during code generation. ***/
/*** RTOS startup code. Macro PEX_RTOS_START is defined by the RTOS component. DON'T MODIFY THIS CODE!!! ***/
#ifdef PEX_RTOS_START
PEX_RTOS_START(); /* Startup of the selected RTOS. Macro is defined by the RTOS component. */
#endif
/*** End of RTOS startup code. ***/
/*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/
for(;;){}
/*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/
} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/