14#if defined(_LIN_SLAVE_HW_SERIAL_H_)
96 #if defined(LIN_SLAVE_DEBUG_SERIAL) && (LIN_SLAVE_DEBUG_LEVEL >= 2)
97 LIN_SLAVE_DEBUG_SERIAL.print(this->
nameLIN);
98 LIN_SLAVE_DEBUG_SERIAL.println(
": LIN_Slave_HardwareSerial::begin()");
118 #if defined(LIN_SLAVE_DEBUG_SERIAL) && (LIN_SLAVE_DEBUG_LEVEL >= 2)
119 LIN_SLAVE_DEBUG_SERIAL.print(this->
nameLIN);
120 LIN_SLAVE_DEBUG_SERIAL.println(
": LIN_Slave_HardwareSerial::end()");
136 static uint32_t usLastByte = 0;
149 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.
char nameLIN[LIN_SLAVE_BUFLEN_NAME]
LIN node name, e.g. for debug.
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!)