Thank you for your reply, i tried your suggestion but still it gives me the same problem i faced earlier.
Anyways, I removed all the cofunctions because i would like to get a better understanding of sending and recieving msgs to ports.
However, I still have a problem! I created a buffer that i store in it my msgData and pass it to port C then B. I get an empty buffer in port B which am sure that i dont pass an empty array.
Am new to embedded systems development, and your help is highly appreciated.
Please, do have look to the code.
while (1)
{
loophead();
costate
{
memcpy(buffer, msgData, msgData(string2));
serCputs(buffer);
memset(buffer, 0x00, sizeof(buffer));
n = serBread(buffer, sizeof(buffer),20);
serBputs(buffer);
printf("%s", buffer);
}
}