![]() |
LIN_master
0.1
Arduino LIN master emulation with preemptive background operation
|
LIN master node class. More...
#include <LIN_master1.h>
Public Member Functions | |
LIN_Master_1 () | |
class constructor More... | |
![]() | |
void | begin (uint16_t Baudrate, LIN_version_t Version, bool Background) |
setup UART and LIN framework More... | |
void | end (void) |
end UART communication void end(void); //!< end UART communication More... | |
LIN_error_t | sendMasterRequest (uint8_t id, uint8_t numData, uint8_t *data) |
send a master request frame More... | |
LIN_error_t | receiveSlaveResponse (uint8_t id, uint8_t numData, void(*Rx_handler)(uint8_t, uint8_t *)) |
receive a slave response frame with callback function More... | |
LIN_error_t | receiveSlaveResponse (uint8_t id, uint8_t numData, uint8_t *data) |
receive a slave response frame and copy to buffer More... | |
void | handlerSend (void) |
LIN master receive handler for task scheduler. More... | |
void | handlerReceive (void) |
send handler for task scheduler More... | |
void | defaultCallback (uint8_t numData, uint8_t *data) |
receive callback function to copy data to buffer More... | |
Additional Inherited Members | |
![]() | |
bool | flagTxComplete |
flag to indicate that data transmission is complete. Must be cleared manually | |
bool | flagRxComplete |
flag to indicate that data reception is complete. Must be cleared manually | |
LIN_error_t | error |
error state. Is latched until cleared | |
![]() | |
uint8_t | protectID (uint8_t id) |
calculate protected LIN ID More... | |
uint8_t | checksum (uint8_t id, uint8_t numData, uint8_t *data) |
calculate frame checksum More... | |
![]() | |
HardwareSerial * | pSerial |
pointer to used serial | |
void(* | wrapperSend )(void) |
wrapper for transmission handler (for task scheduler) | |
void(* | wrapperReceive )(void) |
wrapper for reception handler (for task scheduler) | |
void(* | wrapperDefaultCallback )(uint8_t, uint8_t *) |
wrapper for default receive callback function | |
uint16_t | baudrate |
communication baudrate [Baud] | |
LIN_version_t | version |
LIN version for checksum calculation. | |
bool | background |
background or blocking operation | |
uint8_t | durationBreak |
duration of sync break [ms] | |
LIN_frame_t | frameType |
LIN frame type. | |
uint8_t | bufTx [12] |
send buffer incl. BREAK, SYNC, DATA and CHK (max. 12B) | |
uint8_t | lenTx |
send buffer length (max. 12) | |
uint8_t | bufRx [12] |
receive buffer incl. SYNC, DATA and CHK (max. 11B) | |
uint8_t | lenRx |
receive buffer length (max. 12) | |
uint8_t | durationFrame |
duration of frame w/o BREAK [ms] | |
LIN_status_t | state |
status of LIN state machine | |
void(* | rx_handler )(uint8_t, uint8_t *) |
handler to decode slave response (for receiveFrame()) | |
uint8_t * | dataPtr |
pointer to data buffer in LIN_master3_copy() | |
LIN master node class.
LIN master node class. For background operation use wrapper functions.
Definition at line 38 of file LIN_master1.h.
LIN_Master_1::LIN_Master_1 | ( | ) |
class constructor
Constructor for LIN node class for Serial1.
Constructor for LIN node class for Serial1. Store pointers used serial interface.
Definition at line 24 of file LIN_master1.cpp.