Functions | |
cy_en_lin_status_t | Cy_LIN_DeInit (LIN_CH_Type *base) |
Deinitialization of a LIN module. More... | |
cy_en_lin_status_t | Cy_LIN_Init (LIN_CH_Type *base, const cy_stc_lin_config_t *pstcConfig) |
Initializes the LIN module. More... | |
cy_en_lin_status_t | Cy_LIN_ReadData (const LIN_CH_Type *base, uint8_t *data) |
Reads response data. More... | |
cy_en_lin_status_t | Cy_LIN_WriteData (LIN_CH_Type *base, const uint8_t *data, uint8_t dataLength) |
Writes response data. More... | |
cy_en_lin_status_t | Cy_LIN_Enable (LIN_CH_Type *base) |
Enables LIN channel. More... | |
cy_en_lin_status_t | Cy_LIN_Disable (LIN_CH_Type *base) |
Disables LIN channel. More... | |
cy_en_lin_status_t | Cy_LIN_SetBreakWakeupFieldLength (LIN_CH_Type *base, uint8_t length) |
Sets LIN break/wakeup field length. More... | |
cy_en_lin_status_t | Cy_LIN_SetDataLength (LIN_CH_Type *base, uint8_t length) |
Sets LIN response field data length. More... | |
cy_en_lin_status_t | Cy_LIN_SetChecksumType (LIN_CH_Type *base, cy_en_lin_checksum_type_t type) |
Sets LIN checksum type setting. More... | |
cy_en_lin_status_t | Cy_LIN_SetCmd (LIN_CH_Type *base, uint32_t command) |
Sets LIN operation command. More... | |
cy_en_lin_status_t | Cy_LIN_SetHeader (LIN_CH_Type *base, uint8_t id) |
Sets LIN header for master tx header operation. More... | |
cy_en_lin_status_t | Cy_LIN_GetHeader (const LIN_CH_Type *base, uint8_t *id, uint8_t *parity) |
Returns received LIN header. More... | |
cy_en_lin_status_t | Cy_LIN_SetInterruptMask (LIN_CH_Type *base, uint32_t mask) |
Sets interrupt source to be accepted. More... | |
cy_en_lin_status_t | Cy_LIN_GetInterruptMask (const LIN_CH_Type *base, uint32_t *mask) |
Returns interrupt mask setting. More... | |
cy_en_lin_status_t | Cy_LIN_GetInterruptMaskedStatus (const LIN_CH_Type *base, uint32_t *status) |
Returns interrupt masked status. More... | |
cy_en_lin_status_t | Cy_LIN_GetInterruptStatus (const LIN_CH_Type *base, uint32_t *status) |
Returns interrupt raw status. More... | |
cy_en_lin_status_t | Cy_LIN_ClearInterrupt (LIN_CH_Type *base, uint32_t mask) |
Clears interrupt status. More... | |
cy_en_lin_status_t | Cy_LIN_GetStatus (const LIN_CH_Type *base, uint32_t *status) |
cy_en_lin_status_t | Cy_LIN_EnOut_Enable (LIN_CH_Type *base) |
Enables LIN channel 'en' out. More... | |
cy_en_lin_status_t | Cy_LIN_EnOut_Disable (LIN_CH_Type *base) |
Disables LIN channel 'en' out. More... | |
cy_en_lin_status_t | Cy_LIN_TestMode_Enable (LIN_Type *base, const cy_stc_lin_test_config_t *linTestConfig) |
Enables LIN Testing mode. More... | |
cy_en_lin_status_t | Cy_LIN_TestMode_Disable (LIN_Type *base) |
Disables LIN Testing mode. More... | |
cy_en_lin_status_t | Cy_LIN_ErrCtl_Enable (LIN_Type *base, cy_stc_lin_test_error_config_t *testErrorConfig) |
Enables LIN ERROR CTL. More... | |
cy_en_lin_status_t | Cy_LIN_ErrCtl_Disable (LIN_Type *base) |
Disables LIN ERROR CTL. More... | |
cy_en_lin_status_t Cy_LIN_DeInit | ( | LIN_CH_Type * | base | ) |
Deinitialization of a LIN module.
This function deinitializes the selected LIN channel.
base | Pointer to LIN instance channel register |
cy_en_lin_status_t Cy_LIN_Init | ( | LIN_CH_Type * | base, |
const cy_stc_lin_config_t * | pstcConfig | ||
) |
Initializes the LIN module.
This function initializes LIN according to the options setup in the passed Config Struct. Several checkings are done before that and an error is returned if invalid Modes are requested.
base | Pointer to LIN instance channel register |
pstcConfig | LIN module configuration. See cy_stc_lin_config_t. |
cy_en_lin_status_t Cy_LIN_ReadData | ( | const LIN_CH_Type * | base, |
uint8_t * | data | ||
) |
Reads response data.
Data is read in Bytes. Maximum data length is 8-bytes.
base | Pointer to LIN instance channel register |
data | Pointer to received data. Must have enough space for current Rx data. |
cy_en_lin_status_t Cy_LIN_WriteData | ( | LIN_CH_Type * | base, |
const uint8_t * | data, | ||
uint8_t | dataLength | ||
) |
Writes response data.
Data is written in Bytes. Maximum data length is 8-bytes.
base | Pointer to LIN instance channel register |
data | Pointer to response data. |
dataLength | Data length in bytes. |
cy_en_lin_status_t Cy_LIN_Enable | ( | LIN_CH_Type * | base | ) |
Enables LIN channel.
base | Pointer to LIN instance channel register |
cy_en_lin_status_t Cy_LIN_Disable | ( | LIN_CH_Type * | base | ) |
Disables LIN channel.
Disabling LIN channel causes clearing of non retained registers. e.g) CMD register, INTR register, STATUS register. This behavior can be used for re-initialization, after error or abort RX operation.
base | Pointer to LIN instance channel register |
cy_en_lin_status_t Cy_LIN_SetBreakWakeupFieldLength | ( | LIN_CH_Type * | base, |
uint8_t | length | ||
) |
Sets LIN break/wakeup field length.
Normally this interface(I/F) is used for detection of the wakeup pulse.
base | Pointer to LIN instance channel register |
length | Bit length of the break/wakeup field. |
cy_en_lin_status_t Cy_LIN_SetDataLength | ( | LIN_CH_Type * | base, |
uint8_t | length | ||
) |
Sets LIN response field data length.
Data is in Bytes and maximum data length is 8-bytes.
base | Pointer to LIN instance channel register |
length | Data length in byte |
cy_en_lin_status_t Cy_LIN_SetChecksumType | ( | LIN_CH_Type * | base, |
cy_en_lin_checksum_type_t | type | ||
) |
Sets LIN checksum type setting.
base | Pointer to LIN instance channel register |
type | Checksum type. Refer cy_en_lin_checksum_type_t |
cy_en_lin_status_t Cy_LIN_SetCmd | ( | LIN_CH_Type * | base, |
uint32_t | command | ||
) |
Sets LIN operation command.
base | Pointer to LIN instance channel register |
command | Required operation command. Refer LIN Command Type Definition |
cy_en_lin_status_t Cy_LIN_SetHeader | ( | LIN_CH_Type * | base, |
uint8_t | id | ||
) |
Sets LIN header for master tx header operation.
base | Pointer to LIN instance channel register |
id | ID value |
cy_en_lin_status_t Cy_LIN_GetHeader | ( | const LIN_CH_Type * | base, |
uint8_t * | id, | ||
uint8_t * | parity | ||
) |
Returns received LIN header.
base | Pointer to LIN instance channel register |
id | Received ID value. |
parity | Pointer to received parity value. |
cy_en_lin_status_t Cy_LIN_SetInterruptMask | ( | LIN_CH_Type * | base, |
uint32_t | mask | ||
) |
Sets interrupt source to be accepted.
base | Pointer to LIN instance channel register |
mask | The mask with the OR of the interrupt source to be accepted. See LIN ALL Interrupt Mask Definition for the set of constants. |
cy_en_lin_status_t Cy_LIN_GetInterruptMask | ( | const LIN_CH_Type * | base, |
uint32_t * | mask | ||
) |
Returns interrupt mask setting.
base | Pointer to LIN instance channel register |
mask | Pointer to the mask with the OR of the interrupt source which is masked. See LIN ALL Interrupt Mask Definition for the set of constants. |
cy_en_lin_status_t Cy_LIN_GetInterruptMaskedStatus | ( | const LIN_CH_Type * | base, |
uint32_t * | status | ||
) |
Returns interrupt masked status.
base | Pointer to LIN instance channel register |
status | Pointer to the mask with the OR of the interrupt source which occurs. See LIN ALL Interrupt Mask Definition for the set of constants. |
cy_en_lin_status_t Cy_LIN_GetInterruptStatus | ( | const LIN_CH_Type * | base, |
uint32_t * | status | ||
) |
Returns interrupt raw status.
base | Pointer to LIN instance channel register |
status | Pointer to the mask with the OR of the interrupt source which occurs. See LIN ALL Interrupt Mask Definition for the set of constants. |
cy_en_lin_status_t Cy_LIN_ClearInterrupt | ( | LIN_CH_Type * | base, |
uint32_t | mask | ||
) |
Clears interrupt status.
base | Pointer to LIN instance channel register |
mask | The mask with the OR of the interrupt source to be cleared. See LIN ALL Interrupt Mask Definition for the set of constants. |
cy_en_lin_status_t Cy_LIN_GetStatus | ( | const LIN_CH_Type * | base, |
uint32_t * | status | ||
) |
base | Pointer to LIN instance channel register |
status | LIN module status. |
cy_en_lin_status_t Cy_LIN_EnOut_Enable | ( | LIN_CH_Type * | base | ) |
Enables LIN channel 'en' out.
If linTransceiverAutoEnable in cy_stc_lin_config_t config structure is set to true then transceiver is set automatically and user need not call this function, else user has to enable LIN transceiver manually before sending a message, and disable it after sending the message.
base | Pointer to LIN instance channel register |
cy_en_lin_status_t Cy_LIN_EnOut_Disable | ( | LIN_CH_Type * | base | ) |
Disables LIN channel 'en' out.
If linTransceiverAutoEnable in cy_stc_lin_config_t config structure is set to true then transceiver is set automatically and user need not call this function, else user has to enable LIN transceiver manually before sending a message, and disable it after sending the message.
base | Pointer to LIN instance channel register |
cy_en_lin_status_t Cy_LIN_TestMode_Enable | ( | LIN_Type * | base, |
const cy_stc_lin_test_config_t * | linTestConfig | ||
) |
Enables LIN Testing mode.
This testing functionality simplifies SW development, but may also be used in the field to verify correct channel functionality.
base | Pointer to LIN instance channel register |
linTestConfig | Pointer to Test configuration structure. |
cy_en_lin_status_t Cy_LIN_TestMode_Disable | ( | LIN_Type * | base | ) |
Disables LIN Testing mode.
This testing functionality simplifies SW development, but may also be used in the field to verify correct channel functionality.
base | Pointer to LIN instance channel register |
cy_en_lin_status_t Cy_LIN_ErrCtl_Enable | ( | LIN_Type * | base, |
cy_stc_lin_test_error_config_t * | testErrorConfig | ||
) |
Enables LIN ERROR CTL.
Enables HW injected channel transmitter errors. The receiver should detect these errors and report these errors through activation of corresponding interrupt causes.
base | Pointer to LIN instance channel register |
testErrorConfig | Pointer to Test Error configuration structure. |
cy_en_lin_status_t Cy_LIN_ErrCtl_Disable | ( | LIN_Type * | base | ) |
Disables LIN ERROR CTL.
Disables HW injected channel transmitter errors.
base | Pointer to LIN instance channel register |