You've already forked meshtastic-device-ui
mirror of
https://github.com/m5stack/meshtastic-device-ui.git
synced 2026-05-20 11:51:03 -07:00
25 lines
561 B
C++
25 lines
561 B
C++
#ifdef ARCH_PORTDUINO
|
|
|
|
#include "comms/LinuxSerialClient.h"
|
|
#include "linux/LinuxSerial.h"
|
|
#include "util/ILog.h"
|
|
|
|
#ifndef SERIAL_BAUD
|
|
#define SERIAL_BAUD 115200
|
|
#endif
|
|
|
|
LinuxSerialClient::LinuxSerialClient(const char *tty) : UARTClient("lnxser"), tty(tty) {}
|
|
|
|
void LinuxSerialClient::init(void)
|
|
{
|
|
ILOG_INFO("LinuxSerialClient::setPath %s with %d baud", tty, SERIAL_BAUD);
|
|
LinuxSerial *serial = new LinuxSerial;
|
|
serial->setPath(tty);
|
|
serial->begin(SERIAL_BAUD);
|
|
_serial = serial;
|
|
|
|
time(&lastReceived);
|
|
SerialClient::init();
|
|
}
|
|
|
|
#endif |