Update FSFW #13
@ -60,7 +60,13 @@ int UartComIF::configureUartPort(UartCookie* uartCookie) {
|
||||
struct termios options = {};
|
||||
|
||||
std::string deviceFile = uartCookie->getDeviceFile();
|
||||
int fd = open(deviceFile.c_str(), O_RDWR);
|
||||
int flags = O_RDWR;
|
||||
if(uartCookie->getUartMode() == UartModes::CANONICAL) {
|
||||
// In non-canonical mode, don't specify O_NONBLOCK because these properties will be
|
||||
// controlled by the VTIME and VMIN parameters and O_NONBLOCK would override this
|
||||
flags |= O_NONBLOCK;
|
||||
}
|
||||
int fd = open(deviceFile.c_str(), flags);
|
||||
|
||||
if (fd < 0) {
|
||||
sif::warning << "UartComIF::configureUartPort: Failed to open uart " << deviceFile <<
|
||||
|
Loading…
Reference in New Issue
Block a user