Carriage returns in sersend strings

Discuss PocketC for Palm OS (including Desktop Edition)

Postby Dave on Thu Feb 15, 2001 2:40 am

I'm writing an applet to control some equipment via serial.

I have to send CR terminated strings to the device in question. I can send strings one char at a time, but I don't know how to send a CR. A "\n" not good enough.

Thanks,
Dave Everett
Dave
 
Posts: 2
Joined: Wed Feb 07, 2001 9:50 pm

Postby s_hart on Fri Feb 16, 2001 3:01 am

In ascii, cr is 13 and lf is 10 and your receiver may need cr and lf, so you may need to try

#define ser_cr 13
#define ser_lf 10

sersend( ser_cr );
sersend( ser_lf );

or it might need just ser_lf or just ser_cr.
s_hart
 
Posts: 3
Joined: Fri Jan 19, 2001 9:47 pm


Return to PocketC for Palm OS

Who is online

Users browsing this forum: No registered users and 3 guests

cron