| LIN_master_portable_Arduino 1.9 Arduino library for Local Interconnect Network master node emulation

Loading...
Searching...
No Matches
LIN_master_HardwareSerial_ESP8266.h
Go to the documentation of this file.
1
9// assert ESP8266 platform
10#if defined(ARDUINO_ARCH_ESP8266)
11
12/*-----------------------------------------------------------------------------
13 MODULE DEFINITION FOR MULTIPLE INCLUSION
14-----------------------------------------------------------------------------*/
15#ifndef _LIN_MASTER_HW_SERIAL_ESP8266_H_
16#define _LIN_MASTER_HW_SERIAL_ESP8266_H_
17
18
19/*-----------------------------------------------------------------------------
20 INCLUDE FILES
21-----------------------------------------------------------------------------*/
22
23// include required libraries
24#include <LIN_master_Base.h>
25
26
27/*-----------------------------------------------------------------------------
28 GLOBAL CLASS
29-----------------------------------------------------------------------------*/
35 class LIN_Master_HardwareSerial_ESP8266 : public LIN_Master_Base
36{
37 // PROTECTED VARIABLES
38 protected:
39
40 HardwareSerial *pSerial;
41 bool swapPins;
42
43
44 // PROTECTED METHODS
45 protected:
46
48 LIN_Master_Base::state_t _sendBreak(void);
49
51 LIN_Master_Base::state_t _sendFrame(void);
52
54 LIN_Master_Base::state_t _receiveFrame(void);
55
56
57 // PUBLIC METHODS
58 public:
59
61 LIN_Master_HardwareSerial_ESP8266(bool SwapPins = false, const char NameLIN[] = "Master", const int8_t PinTxEN = INT8_MIN);
62
64 void begin(uint16_t Baudrate = 19200);
65
67 void end(void);
68
69}; // class LIN_master_HardwareSerial_ESP8266
70
71
72/*-----------------------------------------------------------------------------
73 END OF MODULE DEFINITION FOR MULTIPLE INLUSION
74-----------------------------------------------------------------------------*/
75#endif // _LIN_MASTER_HW_SERIAL_ESP8266_H_
76
77#endif // ARDUINO_ARCH_ESP8266
78
79/*-----------------------------------------------------------------------------
80 END OF FILE
81-----------------------------------------------------------------------------*/
LIN_master_Base.h
Base class for LIN master emulation (non-functional)
LIN_Master_Base
LIN master node base class.
Definition LIN_master_Base.h:106
LIN_Master_Base::state_t
state_t
state of LIN master state machine. Use bitmasks for fast checking multiple states
Definition LIN_master_Base.h:128
LIN_Master_HardwareSerial_ESP8266
LIN master node class via ESP8266 HardwareSerial.
Definition LIN_master_HardwareSerial_ESP8266.h:36
LIN_Master_HardwareSerial_ESP8266::end
void end(void)
Close serial interface.
Definition LIN_master_HardwareSerial_ESP8266.cpp:255
LIN_Master_HardwareSerial_ESP8266::_sendFrame
LIN_Master_Base::state_t _sendFrame(void)
Send LIN bytes (request frame: SYNC+ID+DATA[]+CHK; response frame: SYNC+ID)
Definition LIN_master_HardwareSerial_ESP8266.cpp:70
LIN_Master_HardwareSerial_ESP8266::begin
void begin(uint16_t Baudrate=19200)
Open serial interface.
Definition LIN_master_HardwareSerial_ESP8266.cpp:226
LIN_Master_HardwareSerial_ESP8266::swapPins
bool swapPins
use alternate pins for Serial0
Definition LIN_master_HardwareSerial_ESP8266.h:41
LIN_Master_HardwareSerial_ESP8266::_receiveFrame
LIN_Master_Base::state_t _receiveFrame(void)
Read and check LIN frame.
Definition LIN_master_HardwareSerial_ESP8266.cpp:135
LIN_Master_HardwareSerial_ESP8266::pSerial
HardwareSerial * pSerial
serial interface used for LIN
Definition LIN_master_HardwareSerial_ESP8266.h:40
LIN_Master_HardwareSerial_ESP8266::_sendBreak
LIN_Master_Base::state_t _sendBreak(void)
Send LIN break.
Definition LIN_master_HardwareSerial_ESP8266.cpp:23