changeset 200:1cc45ae786e5

8132462: UART/index.html#GetFlowControl[testValidCombinations] fails on RPI Summary: Corrected termios fields to use Reviewed-by: alkonsta
author snazarki
date Tue, 28 Jul 2015 18:01:53 +0300
parents 60aeeb749f3c
children d2a298618ab8
files src/share/linux/native/com/oracle/dio/uart/uart.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/linux/native/com/oracle/dio/uart/uart.c	Tue Jul 21 22:08:36 2015 +0300
+++ b/src/share/linux/native/com/oracle/dio/uart/uart.c	Tue Jul 28 18:01:53 2015 +0300
@@ -487,10 +487,10 @@
             term.c_cflag |= CRTSCTS;
         }
         if(mode & FLOWCONTROL_XONXOFF_IN){
-            term.c_cflag |= IXON;
+            term.c_iflag |= IXON;
         }
         if(mode & FLOWCONTROL_XONXOFF_OUT){
-            term.c_cflag |= IXOFF;
+            term.c_iflag |= IXOFF;
         }
     }
 
@@ -510,8 +510,8 @@
     *mode = 0; //means FLOWCONTROL_NONE
 
     if(term.c_cflag & CRTSCTS) *mode |= (FLOWCONTROL_RTSCTS_IN | FLOWCONTROL_RTSCTS_OUT);
-    if(term.c_cflag & IXON) *mode |= FLOWCONTROL_XONXOFF_IN;
-    if(term.c_cflag & IXOFF) *mode |= FLOWCONTROL_XONXOFF_OUT;
+    if(term.c_iflag & IXON) *mode |= FLOWCONTROL_XONXOFF_IN;
+    if(term.c_iflag & IXOFF) *mode |= FLOWCONTROL_XONXOFF_OUT;
 
     return JAVACALL_DIO_OK;
 }