445 |
|
|
446 |
tcsetattr(serial_fd, TCSANOW, ptermios); |
tcsetattr(serial_fd, TCSANOW, ptermios); |
447 |
*/ |
*/ |
448 |
|
pser_inf->ptermios->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON); |
449 |
|
pser_inf->ptermios->c_oflag &= ~OPOST; |
450 |
|
pser_inf->ptermios->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN); |
451 |
|
pser_inf->ptermios->c_cflag &= ~(CSIZE|PARENB); |
452 |
|
pser_inf->ptermios->c_cflag |= CS8; |
453 |
|
tcsetattr(serial_fd, TCSANOW, pser_inf->ptermios); |
454 |
|
|
|
cfmakeraw(pser_inf->ptermios); |
|
455 |
*handle = serial_fd; |
*handle = serial_fd; |
456 |
|
|
457 |
/* all read and writes should be non blocking */ |
/* all read and writes should be non blocking */ |