Results 1 to 1 of 1
hi,
I am using Rs232 for communication with my device.
how do i configure RS232.
in my code i am doing like below.
initport(fd)
{
struct termios options;
tcgetattr(fd,&options);
cfsetispeed(&options,B115200);
...
- 04-06-2007 #1Just Joined!
- Join Date
- Nov 2006
- Location
- Hyderabad
- Posts
- 85
RS232 Configuration
hi,
I am using Rs232 for communication with my device.
how do i configure RS232.
in my code i am doing like below.
initport(fd)
{
struct termios options;
tcgetattr(fd,&options);
cfsetispeed(&options,B115200);
cfsetospeed(&options,B115200);
options.c_cflag |= (CLOCAL | CREAD);
options.c_cflag &= ~CPARENB;
options.c_cflag &= ~CSTOPB;
options.c_cflag &= ~CSIZE;
options .c_cflag |= CS8;
tcsetattr(fd,TCSANOW,&options);
return 1;
}
i also wnat to set the END OF TEXT,END OF TRANSMISSION
could you please tell me how to configure the end of text and end of transmission.
thanks in advance
regards
rajkumar


Reply With Quote