I'm trying to use the ASerialLDD1 serial component - more specifically the RecvBlock and SendBlock functions.
I found the following code in the help on the component;
Component documentation - Typical Usage
volatile bool DataReceivedFlg = FALSE; char OutData[] = "Hello world"; char InpData[10]; LDD_TError Error; LDD_TDeviceData *MySerialPtr; void main(void) { . . . MySerialPtr = AS1_Init(NULL); /* Initialization of AS1 component */ for(;;) { Error = AS1_ReceiveBlock(MySerialPtr, InpData, 1U); /* Start reception of one character */ while (!DataReceivedFlg) { /* Wait until 'e' character is received */ } if (InpData[0] == 'e') { Error = AS1_SendBlock(MySerialPtr, OutData, sizeof(OutData)); /* Send block of characters */ } DataReceivedFlg = FALSE; } }
|
But when I add this code to my project, I get an error message from the compiler;
MySerialPtr = AS1_Init(NULL);
too many agrumentsto function AS1_Init void value not ignored as it should be.
Has anyone else seen this or am I doing something wrong...?