|
RSS
Feed












Wires No More!
$159.99 a pair

Wireless Serial Adapter
(Bluetooth to RS232)
|
| PutByte(),
GetByte(), PutPacket(), GetPacket(), PutString(), GetString() sometimes seem to
be slower than expected
.[All versions] |
COMM-DRV/Lib optimizes its transmissions and receptions
in a background thread. It may buffer several byte/packet operations before
they are actually outputted. To get around this you can replace the above
functions with functions similar to the following.
- //************************************
FastPutByte(int Port,char ch)
{
int Status;
Status=PutByte(Port,ch);
ser_rs232_putpacket(Port,0,(unsigned char *)0);
return(Status);
}
//************************************
FastPutPacket(int Port,int Len,char *ch)
{
int Status;
Status=PutPacket(Port,Len,ch);
ser_rs232_putpacket(Port,0,(unsigned char *)0);
return(Status);
}
//************************************
FastPutString(int Port,char *ch)
{
int Status;
Status=PutString(Port,ch);
ser_rs232_putpacket(Port,0,(unsigned char *)0);
return(Status);
}
//************************************
FastGetByte(int Port)
{
ser_rs232_getpacket(Port,0,(unsigned char *)0);
return(GetByte(Port));
}
//************************************
FastGetPacket(int Port,int Len,char *ch)
{
ser_rs232_getpacket(Port,0,(unsigned char *)0);
return(GetPacket(Port,Len,ch));
}
//************************************
FastGetString(int Port,int Len,char *ch)
{
ser_rs232_getpacket(Port,0,(unsigned char *)0);
return(GetString(Port,Len,ch));
}
|
Updated:
04/03/2008 |