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 (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 (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 (LIN_CH_Type *base, uint32_t *mask) |
Returns interrupt mask setting. More... | |
cy_en_lin_status_t | Cy_LIN_GetInterruptMaskedStatus (LIN_CH_Type *base, uint32_t *status) |
Returns interrupt masked status. More... | |
cy_en_lin_status_t | Cy_LIN_GetInterruptStatus (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 (LIN_CH_Type *base, uint32_t *status) |
Returns LIN module status. More... | |
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 *lin_test_config) |
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 *test_error_config) |
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.
[in] | base | Pointer to LIN instance channel register |
Refer | cy_en_lin_status_t |
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.
[in] | base | Pointer to LIN instance register area |
[in] | pstcConfig | LIN module configuration. See cy_stc_lin_config_t. |
Refer | cy_en_lin_status_t |
cy_en_lin_status_t Cy_LIN_ReadData | ( | LIN_CH_Type * | base, |
uint8_t * | data | ||
) |
Reads response data.
Data is read in Bytes. Maximum data length is 8-bytes.
base | [in] Pointer to LIN instance register area. |
data | [out] Pointer to received data. Must have enough space for current Rx data. |
Refer | cy_en_lin_status_t |
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 | [in] Pointer to LIN instance register area. |
data | [in] Pointer to response data. |
dataLength | [in] Data length in bytes. |
Refer | cy_en_lin_status_t |
cy_en_lin_status_t Cy_LIN_Enable | ( | LIN_CH_Type * | base | ) |
Enables LIN channel.
base | [in] Pointer to LIN instance register area. |
Refer | cy_en_lin_status_t |
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 | [in] Pointer to LIN instance register area. |
Refer | cy_en_lin_status_t |
cy_en_lin_status_t Cy_LIN_SetBreakWakeupFieldLength | ( | LIN_CH_Type * | base, |
uint8_t | length | ||
) |
Sets LIN break/wakeup field length.
Normally this I/F is used for detection of the wakeup pulse.
base | [in] Pointer to LIN instance register area. |
length | [in] Bit length of the break/wakeup field. |
Refer | cy_en_lin_status_t |
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 | [in] Pointer to LIN instance register area. |
length | [in] Data length in byte |
Refer | cy_en_lin_status_t |
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 | [in] Pointer to LIN instance register area. |
type | [in] Checksum type. Refer cy_en_lin_checksum_type_t |
Refer | cy_en_lin_status_t |
cy_en_lin_status_t Cy_LIN_SetCmd | ( | LIN_CH_Type * | base, |
uint32_t | command | ||
) |
Sets LIN operation command.
base | [in] Pointer to LIN instance register area. |
command | [in] Required operation command. Refer LIN Command Type Definition |
Refer | cy_en_lin_status_t |
cy_en_lin_status_t Cy_LIN_SetHeader | ( | LIN_CH_Type * | base, |
uint8_t | id | ||
) |
Sets LIN header for master tx header operation.
base | [in] Pointer to LIN instance register area. |
id | [in] ID value |
Refer | cy_en_lin_status_t |
cy_en_lin_status_t Cy_LIN_GetHeader | ( | LIN_CH_Type * | base, |
uint8_t * | id, | ||
uint8_t * | parity | ||
) |
Returns received LIN header.
base | [in] Pointer to LIN instance register area. |
id | [out] Received ID value. |
parity | [out] Received parity value. Note that parity check is always done by HW automatically. |
Refer | cy_en_lin_status_t |
cy_en_lin_status_t Cy_LIN_SetInterruptMask | ( | LIN_CH_Type * | base, |
uint32_t | mask | ||
) |
Sets interrupt source to be accepted.
base | [in] Pointer to LIN instance register area. |
mask | [in] The mask with the OR of the interrupt source to be accepted. See LIN ALL Interrupt Mask Definition for the set of constants. |
Refer | cy_en_lin_status_t |
cy_en_lin_status_t Cy_LIN_GetInterruptMask | ( | LIN_CH_Type * | base, |
uint32_t * | mask | ||
) |
Returns interrupt mask setting.
base | [in] Pointer to LIN instance register area. |
mask | [out] The mask with the OR of the interrupt source which is masked. See LIN ALL Interrupt Mask Definition for the set of constants. |
Refer | cy_en_lin_status_t |
cy_en_lin_status_t Cy_LIN_GetInterruptMaskedStatus | ( | LIN_CH_Type * | base, |
uint32_t * | status | ||
) |
Returns interrupt masked status.
base | [in] Pointer to LIN instance register area. |
status | [out] The mask with the OR of the interrupt source which occurs. See LIN ALL Interrupt Mask Definition for the set of constants. |
Refer | cy_en_lin_status_t |
cy_en_lin_status_t Cy_LIN_GetInterruptStatus | ( | LIN_CH_Type * | base, |
uint32_t * | status | ||
) |
Returns interrupt raw status.
base | [in] Pointer to LIN instance register area. |
status | [out] The mask with the OR of the interrupt source which occurs. See LIN ALL Interrupt Mask Definition for the set of constants. |
Refer | cy_en_lin_status_t |
cy_en_lin_status_t Cy_LIN_ClearInterrupt | ( | LIN_CH_Type * | base, |
uint32_t | mask | ||
) |
Clears interrupt status.
base | [in] Pointer to LIN instance register area. |
mask | [in] The mask with the OR of the interrupt source to be cleared. See LIN ALL Interrupt Mask Definition for the set of constants. |
Refer | cy_en_lin_status_t |
cy_en_lin_status_t Cy_LIN_GetStatus | ( | LIN_CH_Type * | base, |
uint32_t * | status | ||
) |
Returns LIN module status.
base | [in] Pointer to LIN instance register area. |
status | [out] LIN module status. |
Refer | cy_en_lin_status_t |
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 call Cy_Status_EnOut_Enable() before sending a message and call Cy_Status_EnOut_Disable() after sending the message.
base | [in] Pointer to LIN instance register area. |
Refer | cy_en_lin_status_t |
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 call Cy_Status_EnOut_Enable() before sending a message and call Cy_Status_EnOut_Disable() after sending the message.
base | [in] Pointer to LIN instance register area. |
Refer | cy_en_lin_status_t |
cy_en_lin_status_t Cy_LIN_TestMode_Enable | ( | LIN_Type * | base, |
const cy_stc_lin_test_config_t * | lin_test_config | ||
) |
Enables LIN Testing mode.
This testing functionality simplifies SW development, but may also be used in the field to verify correct channel functionality.
base | [in] Pointer to LIN instance register area. |
lin_test_config | [in] pointer to Test configuration structure. |
Refer | cy_en_lin_status_t |
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 | [in] Pointer to LIN instance register area. |
Refer | cy_en_lin_status_t |
cy_en_lin_status_t Cy_LIN_ErrCtl_Enable | ( | LIN_Type * | base, |
cy_stc_lin_test_error_config_t * | test_error_config | ||
) |
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 | [in] Pointer to LIN instance register area. |
test_error_config | [in] pointer to Test Error configuration structure. |
Refer | cy_en_lin_status_t |
cy_en_lin_status_t Cy_LIN_ErrCtl_Disable | ( | LIN_Type * | base | ) |
Disables LIN ERROR CTL.
Disables HW injected channel transmitter errors.
base | [in] Pointer to LIN instance register area. |
Refer | cy_en_lin_status_t |