Component: LIN Slave (Comms)

From Flowcode Help
Revision as of 12:13, 21 July 2016 by BenR (talk | contribs) (XML import)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


Author Matrix Ltd
Version 1.2 (Release)
Category Comms


Image LIN Slave component

Low level routines for controlling the LIN bus (1.3 / 2.0) slave 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 state of the device

Parameters

This macro has no parameters


Return value

BYTE


ListenForMessages

Listens for messages with Timeout and returns the state

Parameters

BYTE Timeout
BYTE ChecksumType
0=Classic, 1=Enhanced


Return value

BYTE


ReadAddress

Returns the Identifier read

Parameters

This macro has no parameters


Return value

BYTE


ReadDataCount

Return the data count size for Message

Parameters

BYTE Message


Return value

BYTE


ReadData

Returns the message data byte

Parameters

BYTE Message
Message to be read
BYTE Index
Index of data byte to be returned


Return value

BYTE


SetData

Set the Message data to be automatically sent as part of the ListenForMessages macro.

Parameters

BYTE Message
Message to assign data for Range: 1-8
BYTE Data1
Data byte value
BYTE Data2
Data byte value
BYTE Data3
Data byte value
BYTE Data4
Data byte value
BYTE Data5
Data byte value
BYTE Data6
Data byte value
BYTE Data7
Data byte value
BYTE Data8
Data byte value


Return value

BYTE


Initialize

Initialises the device

Parameters

This macro has no parameters


Return value

This call does not return a value


WakeUp

Wake Up the device

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

TX pin

This property is of type Single digital pin and can be referenced with the variable name TX.

LIN bus data transmit pin

RX pin

This property is of type Single digital pin and can be referenced with the variable name RX.

LIN bus data receive pin

CS pin

This property is of type Single digital pin and can be referenced with the variable name CS.

LIN bus chip select pin

FAULT pin

This property is of type Single digital pin and can be referenced with the variable name FAULT.

LIN bus fault detection pin

VREG pin

This property is of type Single digital pin and can be referenced with the variable name VREG.

LIN bus voltage regulation pin

MESSAGES

This property is of type Fixed list of ints and can be referenced with the variable name MESSAGES.

Number of messages the firmware is designed to listen for

ID

This property is of type Signed integer and can be referenced with the variable name MSG1_ID.

Message identifier to listen for

BYTES

This property is of type Fixed list of ints and can be referenced with the variable name MSG1_BYTES.

Number of bytes to expent in the packet

TX_RX

This property is of type Fixed list of ints and can be referenced with the variable name MSG1_TX_RX.

Data direction for packet

ID

This property is of type Signed integer and can be referenced with the variable name MSG2_ID.

Message identifier to listen for

BYTES

This property is of type Fixed list of ints and can be referenced with the variable name MSG2_BYTES.

Number of bytes to expent in the packet

TX_RX

This property is of type Fixed list of ints and can be referenced with the variable name MSG2_TX_RX.

Data direction for packet

ID

This property is of type Signed integer and can be referenced with the variable name MSG3_ID.

Message identifier to listen for

BYTES

This property is of type Fixed list of ints and can be referenced with the variable name MSG3_BYTES.

Number of bytes to expent in the packet

TX_RX

This property is of type Fixed list of ints and can be referenced with the variable name MSG3_TX_RX.

Data direction for packet

ID

This property is of type Signed integer and can be referenced with the variable name MSG4_ID.

Message identifier to listen for

BYTES

This property is of type Fixed list of ints and can be referenced with the variable name MSG4_BYTES.

Number of bytes to expent in the packet

TX_RX

This property is of type Fixed list of ints and can be referenced with the variable name MSG4_TX_RX.

Data direction for packet

ID

This property is of type Signed integer and can be referenced with the variable name MSG5_ID.

Message identifier to listen for

BYTES

This property is of type Fixed list of ints and can be referenced with the variable name MSG5_BYTES.

Number of bytes to expent in the packet

TX_RX

This property is of type Fixed list of ints and can be referenced with the variable name MSG5_TX_RX.

Data direction for packet

ID

This property is of type Signed integer and can be referenced with the variable name MSG6_ID.

Message identifier to listen for

BYTES

This property is of type Fixed list of ints and can be referenced with the variable name MSG6_BYTES.

Number of bytes to expent in the packet

TX_RX

This property is of type Fixed list of ints and can be referenced with the variable name MSG6_TX_RX.

Data direction for packet

ID

This property is of type Signed integer and can be referenced with the variable name MSG7_ID.

Message identifier to listen for

BYTES

This property is of type Fixed list of ints and can be referenced with the variable name MSG7_BYTES.

Number of bytes to expent in the packet

TX_RX

This property is of type Fixed list of ints and can be referenced with the variable name MSG7_TX_RX.

Data direction for packet

ID

This property is of type Signed integer and can be referenced with the variable name MSG8_ID.

Message identifier to listen for

BYTES

This property is of type Fixed list of ints and can be referenced with the variable name MSG8_BYTES.

Number of bytes to expent in the packet

TX_RX

This property is of type Fixed list of ints and can be referenced with the variable name MSG8_TX_RX.

Data direction for packet

Label

This property is of type Line of text and can be referenced with the variable name label.

A text label to aid identifying the component.

Timer Adjust TX

This property is of type Unsigned integer and can be referenced with the variable name TIMER_ADJUST_T.

No additional information


Timer Adjust RX

This property is of type Unsigned integer and can be referenced with the variable name TIMER_ADJUST_R.

No additional information