SerialSendComplete
Posted: Thu Aug 07, 2014 5:08 am
Hi,
Tried the use the SerialSendComplete function but receive only FALSE. Any hints? (MOD5282 and MOD54415)
int ser1 = SimpleOpenSerial(1, 115200);
char buf[512];
// fill buffer
for (unsigned int i=0;i<sizeof(buf)-1;i++)
{
buf=0x41; // fill buffer with 'A'
}
buf[509] = '\13';
buf[510] = '\10';
buf[511] = '\0';
iprintf("Application started\n");
int ticks=0;
while (1)
{
ticks = TimeTick;
writeall(ser1, buf, sizeof(buf) );
ticks = TimeTick-ticks;
while(SerialSendComplete(ser1)==FALSE) // <-- this never gets TRUE
{
OSTimeDly(0);
}
iprintf("ticks=%u\r\n", ticks, SerialSendComplete(ser1));
OSTimeDly(TICKS_PER_SECOND * 3);
}
Tried the use the SerialSendComplete function but receive only FALSE. Any hints? (MOD5282 and MOD54415)
int ser1 = SimpleOpenSerial(1, 115200);
char buf[512];
// fill buffer
for (unsigned int i=0;i<sizeof(buf)-1;i++)
{
buf=0x41; // fill buffer with 'A'
}
buf[509] = '\13';
buf[510] = '\10';
buf[511] = '\0';
iprintf("Application started\n");
int ticks=0;
while (1)
{
ticks = TimeTick;
writeall(ser1, buf, sizeof(buf) );
ticks = TimeTick-ticks;
while(SerialSendComplete(ser1)==FALSE) // <-- this never gets TRUE
{
OSTimeDly(0);
}
iprintf("ticks=%u\r\n", ticks, SerialSendComplete(ser1));
OSTimeDly(TICKS_PER_SECOND * 3);
}