#include <UART.hpp>
Definition at line 6 of file UART.hpp.
◆ UART()
◆ ~UART()
◆ VConnect()
Implements ICommunication.
Definition at line 22 of file UART.cpp.
74 #error "Please define JETSON_DEVICE variable"
76 #if JETSON_DEVICE == 0
77 const char* ttyPath =
"/dev/ttyTHS0";
79 const char* ttyPath =
"/dev/ttyTHS1";
81 speed_t speed = B1000000;
82 tty_fd = open(ttyPath, O_RDWR | O_NOCTTY | O_SYNC);
85 std::cout <<
"ERROR: Could not open tty " << *ttyPath;
90 memset(&tty, 0,
sizeof tty);
94 tty.c_cflag = (CS8 | CLOCAL | CREAD);
99 cfsetospeed(&tty, speed);
100 cfsetispeed(&tty, speed);
102 tcsetattr(
tty_fd, TCSANOW, &tty);
104 tcflush(
tty_fd, TCIOFLUSH);
References ICommunication::m_connected, and tty_fd.
◆ VDisconnect()
| void UART::VDisconnect |
( |
| ) |
|
|
overridevirtual |
◆ VReceiveData()
| size_t UART::VReceiveData |
( |
void * |
pData, |
|
|
const size_t |
len |
|
) |
| |
|
overridevirtual |
◆ VSendData()
| size_t UART::VSendData |
( |
void * |
pData, |
|
|
const size_t |
len |
|
) |
| |
|
overridevirtual |
◆ tty_fd
The documentation for this class was generated from the following files: