Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main() {
- int fd = open( "/dev/ttyS4", O_RDWR | O_CLOEXEC | O_NOCTTY | O_NONBLOCK );
- if( fd < 0 ) {
- perror( "open" );
- return 1;
- }
- if( uart_enable_rs485( fd, true ) < 0 ) {
- perror( "uart_enable_rs485" );
- return 1;
- }
- close( fd );
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment