Package jtermios

Examples of jtermios.Termios


        // check if we can open a port with the given name
        int fd = jtermios.JTermios.open(portName, O_RDWR | O_NOCTTY | O_NONBLOCK);
        if (fd != -1) {
          // yep, it exists, now check to see if it's really a serial
          // port
          if (tcgetattr(fd, new Termios()) != -1 || errno() != ENOTTY) {
            jtermios.JTermios.close(fd);
            return new CommPortIdentifier(portName, PORT_SERIAL,
                null);
          } else {
            // Not a serial port, or we can't access it
View Full Code Here


    flags &= ~O_NONBLOCK;
   
    System.out.println("clear O_NONBLOCK");
    checkReturnCode(fcntl(m_FD, F_SETFL, flags));
   
    Termios m_Termios=new Termios();
   
    System.out.println("get termios");
    checkReturnCode(tcgetattr(m_FD, m_Termios));
    cfmakeraw(m_FD, m_Termios);
    m_Termios.c_cflag |= CLOCAL | CREAD;
View Full Code Here

    String port = TestBase.getPortName();

    int fd;
    S(fd = open(port, O_RDWR | O_NOCTTY | O_NONBLOCK), "failed to open port");

    Termios opts = new Termios();

    S(tcgetattr(fd, opts));

    opts.c_iflag = IGNBRK | IGNPAR;
    opts.c_oflag = 0;
View Full Code Here

TOP

Related Classes of jtermios.Termios

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.