LIN_master_portable_Arduino 1.4
Arduino library for Local Interconnect Network master node emulation
Loading...
Searching...
No Matches
LIN_master_HardwareSerial.h
Go to the documentation of this file.
1
9/*-----------------------------------------------------------------------------
10 MODULE DEFINITION FOR MULTIPLE INCLUSION
11-----------------------------------------------------------------------------*/
12#ifndef _LIN_MASTER_HW_SERIAL_H_
13#define _LIN_MASTER_HW_SERIAL_H_
14
15
16/*-----------------------------------------------------------------------------
17 INCLUDE FILES
18-----------------------------------------------------------------------------*/
19
20// include required libraries
21#include <LIN_master_Base.h>
22
23
24/*-----------------------------------------------------------------------------
25 GLOBAL CLASS
26-----------------------------------------------------------------------------*/
33{
34 // PROTECTED VARIABLES
35 protected:
36
37 HardwareSerial *pSerial;
38
39
40 // PROTECTED METHODS
41 protected:
42
45
48
51
52
53 // PUBLIC METHODS
54 public:
55
57 LIN_Master_HardwareSerial(HardwareSerial &Interface, const char NameLIN[] = "Master", const int8_t PinTxEN = INT8_MIN);
58
60 void begin(uint16_t Baudrate = 19200);
61
63 void end(void);
64
65}; // class LIN_Master_HardwareSerial
66
67
68/*-----------------------------------------------------------------------------
69 END OF MODULE DEFINITION FOR MULTIPLE INLUSION
70-----------------------------------------------------------------------------*/
71#endif // _LIN_MASTER_HW_SERIAL_H_
72
73/*-----------------------------------------------------------------------------
74 END OF FILE
75-----------------------------------------------------------------------------*/
Base class for LIN master emulation (non-functional)
LIN master node base class.
state_t
state of LIN master state machine. Use bitmasks for fast checking multiple states
LIN master node class via HardwareSerial.
void end(void)
Close serial interface.
HardwareSerial * pSerial
serial interface used for LIN
void begin(uint16_t Baudrate=19200)
Open serial interface.
LIN_Master_Base::state_t _sendBreak(void)
Send LIN break.
LIN_Master_Base::state_t _sendFrame(void)
Send LIN bytes (request frame: SYNC+ID+DATA[]+CHK; response frame: SYNC+ID)
LIN_Master_Base::state_t _receiveFrame(void)
Read and check LIN frame.