Component: LIN Master (Comms)
Author | Matrix Ltd |
Version | 1.2 (Release) |
Category | Comms |
Contents
LIN Master component
Low level routines for controlling a LIN master (1.3 & 2.0) interface.
Examples
No additional examples
Downloadable macro reference
PowerDown
Power Down the device
Parameters
- This macro has no parameters
Return value
- This call does not return a value
GetState
Returns the current state
Parameters
- This macro has no parameters
Return value
debug
No additional information
Parameters
- BYTE idx
Return value
ReadDataCount
Returns the data count size
Parameters
- This macro has no parameters
Return value
SendMessage
Sends message with specified identifier and awaits a reply from a slave.
Returns 0 to indicate a successful transaction.
Returns 3 to indicate a timeout.
Returns 6 to indicate a bad CRC.
Parameters
- BYTE Identifier
- BYTE ResponseCount
- BYTE ChecksumType
- 0=Classic, 1=Enhanced
Return value
ReadData
Returns a data byte indexed by Idx
Parameters
- BYTE Idx
Return value
SetData
Sets the data bytes to be sent
Parameters
- BYTE Data1
- BYTE Data2
- BYTE Data3
- BYTE Data4
- BYTE Data5
- BYTE Data6
- BYTE Data7
- BYTE Data8
Return value
- This call does not return a value
SendMessageWithData
Sends a message with data of length DataCount. See SetData
Parameters
- BYTE Identifier
- BYTE DataCount
- BYTE Checksum
- 0=Classic, 1=Enhanced
Return value
WakeUp
Wake Up the device
Parameters
- This macro has no parameters
Return value
- This call does not return a value
Initialise
Initialise the component
Parameters
- This macro has no parameters
Return value
- This call does not return a value
Simulation macro reference
This component does not contain any simulation macros
Property reference
Baud Rate
This property is of type Fixed list of ints and can be referenced with the variable name BAUD_LIST.
LIN bus data rate in bits per second
Label
This property is of type Line of text and can be referenced with the variable name label.
Label shown on the comms flasher component.
TX
This property is of type Single digital pin and can be referenced with the variable name TX.
LIN Transmit Pin
RX
This property is of type Single digital pin and can be referenced with the variable name RX.
LIN Receive Pin
CS
This property is of type Single digital pin and can be referenced with the variable name CS.
LIN bus chip select pin
WAKE
This property is of type Single digital pin and can be referenced with the variable name WAKE.
LIN bus Wake up pin