I have done code for traingular wave generation using lpc2148 but it gives me error.plz check this n tell me.(i hv done coding in eclipse).
#include "includes.h"
OS_STK TestTask1Stack[200];
void TestTask1(void *pdata);
OS_STK TestTask2Stack[200];
void TestTask2(void *pdata);
int main (void)
{
unsigned int a,b;
PINSEL1=0X00200000;
OSInit();
OSTaskCreate(TestTask1, (void *)0, &TestTask1Stack[199], 0);
OSStart();
return 0;
}
void TestTask1(void *pdata)
{
unsigned int a,i=0;
PINSEL1=0X00200000;
while(1)
{
if(a!=0xff)
{
DACR=int(i)<<6;
}
elseif(a!=0x00)
{
DACR=int(i)<<6;
}
}
}