14#if defined(_LIN_SLAVE_HW_SERIAL_H_)
90 #if defined(LIN_SLAVE_LIN_PORT_TIMEOUT) && (LIN_SLAVE_LIN_PORT_TIMEOUT > 0)
91 uint32_t startMillis = millis();
92 while ((!(*(this->
pSerial))) && (millis() - startMillis < LIN_SLAVE_LIN_PORT_TIMEOUT));
101 DEBUG_PRINT(2,
"ok");
135 static uint32_t usLastByte = 0;
141 if (this->
pSerial->available())
151 usLastByte = micros();
LIN slave emulation library using a generic HardwareSerial interface.
LIN slave node base class.
uint16_t baudrate
communication baudrate [Baud]
virtual void begin(uint16_t Baudrate=19200)
Open serial interface.
version_t
LIN protocol version.
virtual void end(void)
Close serial interface.
virtual void handler(void)
Handle LIN protocol and call user-defined frame callbacks.
HardwareSerial * pSerial
pointer to serial interface used for LIN
bool flagBreak
a break was detected, is set in handle
void _resetBreakFlag(void)
Clear break detection flag.
virtual void handler(void)
Handle LIN protocol and call user-defined frame handlers.
void begin(uint16_t Baudrate=19200)
Open serial interface.
void end(void)
Close serial interface.
LIN_Slave_HardwareSerial(HardwareSerial &Interface, uint16_t MinFramePause=1000L, LIN_Slave_Base::version_t Version=LIN_Slave_Base::LIN_V2, const char NameLIN[]="Slave", uint32_t TimeoutRx=1500L, const int8_t PinTxEN=INT8_MIN)
Class constructor.
virtual bool _getBreakFlag(void)
Get break detection flag.
uint16_t minFramePause
min. inter-frame pause [us] to start new frame (not standard compliant!)