OpenCores
URL https://opencores.org/ocsvn/openarty/openarty/trunk

Subversion Repositories openarty

[/] [openarty/] [trunk/] [sw/] [host/] [netuart.cpp] - Diff between revs 4 and 30

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 4 Rev 30
Line 280... Line 280...
#endif
#endif
 
 
                cfmakeraw(&tb); // Sets no parity, 8 bits, one stop bit
                cfmakeraw(&tb); // Sets no parity, 8 bits, one stop bit
                tb.c_cflag &= (~(CRTSCTS)); // Sets no parity, 8 bit
                tb.c_cflag &= (~(CRTSCTS)); // Sets no parity, 8 bit
                tb.c_cflag &= (~(CSTOPB)); // One stop bit
                tb.c_cflag &= (~(CSTOPB)); // One stop bit
 
// #define      LOW_SPEED
#ifndef LOW_SPEED
#ifndef LOW_SPEED
                // Switch to 7 bit
                // Switch to 7 bit
                tb.c_cflag &= ~(CSIZE);
                tb.c_cflag &= ~(CSIZE);
                tb.c_cflag |= CS7;
                tb.c_cflag |= CS7;
                // And 4 MBaud
                // And 4 MBaud
                cfsetispeed(&tb, B4000000);
                cfsetispeed(&tb, B1000000);
                cfsetospeed(&tb, B4000000);
                cfsetospeed(&tb, B1000000);
#else
#else
                // Set the speed to 115200 baud
                // Set the speed to 115200 baud
                cfsetispeed(&tb, B115200);
                cfsetispeed(&tb, B115200);
                cfsetospeed(&tb, B115200);
                cfsetospeed(&tb, B115200);
#endif
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.