Functions | |
| __STATIC_INLINE void | Cy_CANFD_Enable (CANFD_Type *base, uint32_t channelMask) |
| Enables the CAN FD channels. More... | |
| __STATIC_INLINE cy_en_canfd_status_t | Cy_CANFD_Disable (CANFD_Type *base, uint32_t channelMask) |
| Disables the CAN FD channels to stop providing clocks to un-used CAN channels for power saving with this functionality. More... | |
| __STATIC_INLINE void | Cy_CANFD_EnableMRAM (CANFD_Type *base, uint32_t channelMask, uint16_t delay) |
| Switches MRAM on and enables the channels. More... | |
| __STATIC_INLINE cy_en_canfd_status_t | Cy_CANFD_DisableMRAM (CANFD_Type *base) |
| Disables the channels and switches MRAM off. More... | |
| __STATIC_INLINE void | Cy_CANFD_SetBitrate (CANFD_Type *base, uint32_t chan, const cy_stc_canfd_bitrate_t *bitrate) |
| Sets Nominal Bit Timing and Prescaler Register parameters: -Nominal Time segment after sample point; -Nominal Time segment before sample point; -Nominal Baud Rate Prescaler; -Nominal Synchronization Jump Width. More... | |
| __STATIC_INLINE void | Cy_CANFD_SetFastBitrate (CANFD_Type *base, uint32_t chan, const cy_stc_canfd_bitrate_t *fastBitrate) |
| Sets Data Bit Timing and Prescaler Register parameters for data: -Data Time segment after sample point; -Data Time segment before sample point; -Data Baud Rate Prescaler; -Data Synchronization Jump Width. More... | |
| void | Cy_CANFD_SidFilterSetup (CANFD_Type const *base, uint32_t chan, const cy_stc_id_filter_t *filter, uint32_t index, cy_stc_canfd_context_t const *context) |
| Updates the Standard Message ID Filter Element configuration in Message RAM. More... | |
| void | Cy_CANFD_SidFiltersSetup (CANFD_Type const *base, uint32_t chan, const cy_stc_canfd_sid_filter_config_t *filterConfig, cy_stc_canfd_context_t const *context) |
| Updates the Standard Message ID Filters configuration in Message RAM. More... | |
| void | Cy_CANFD_XidFilterSetup (CANFD_Type const *base, uint32_t chan, const cy_stc_extid_filter_t *filter, uint32_t index, cy_stc_canfd_context_t const *context) |
| Updates the Extended Message ID Filter Element configuration in Message RAM. More... | |
| void | Cy_CANFD_XidFiltersSetup (CANFD_Type const *base, uint32_t chan, const cy_stc_canfd_extid_filter_config_t *filterConfig, cy_stc_canfd_context_t const *context) |
| Updates the Extended Message ID Filters configuration in Message RAM. More... | |
| cy_en_canfd_status_t | Cy_CANFD_TxBufferConfig (CANFD_Type const *base, uint32_t chan, const cy_stc_canfd_tx_buffer_t *txBuffer, uint8_t index, cy_stc_canfd_context_t const *context) |
| Updates the T0 and T1 Tx buffer element parameters in Message RAM and copies data from cy_stc_canfd_tx_buffer_t structure to Message RAM. More... | |
| uint32_t | Cy_CANFD_CalcRxBufAdrs (CANFD_Type const *base, uint32_t chan, uint32_t index, cy_stc_canfd_context_t const *context) |
| Calculates the address of the RX buffer element. More... | |
| uint32_t | Cy_CANFD_CalcRxFifoAdrs (CANFD_Type const *base, uint32_t chan, uint32_t fifoNumber, uint32_t index, cy_stc_canfd_context_t const *context) |
| Calculates the address of the RX FIFO element. More... | |
| cy_en_canfd_status_t | Cy_CANFD_GetRxBuffer (CANFD_Type const *base, uint32_t chan, const uint32_t bufferAddress, cy_stc_canfd_rx_buffer_t const *rxBuffer) |
| Extracts the RX Buffer from Message RAM. More... | |
| cy_en_canfd_status_t | Cy_CANFD_GetFIFOTop (CANFD_Type const *base, uint32_t chan, const uint8_t FIFONumber, cy_stc_canfd_rx_buffer_t const *rxBuffer) |
| Extracts one RX FIFO Buffer element using the FIFO TOP register logic. More... | |
| cy_en_canfd_status_t | Cy_CANFD_ExtractMsgFromRXBuffer (CANFD_Type *base, uint32_t chan, bool rxFIFOMsg, uint8_t msgBufOrRxFIFONum, cy_stc_canfd_rx_buffer_t const *rxBuffer, cy_stc_canfd_context_t const *context) |
| Extracts one RX buffer or one FIFO buffer element. More... | |
| void | Cy_CANFD_AckRxBuf (CANFD_Type *base, uint32_t chan, uint32_t bufNum) |
| Acknowledges the data reading and makes the buffer element available for a next message. More... | |
| void | Cy_CANFD_AckRxFifo (CANFD_Type *base, uint32_t chan, uint32_t FIFOnumber) |
| Acknowledges the data reading and makes the buffer element available for a next message. More... | |
| __STATIC_INLINE cy_en_canfd_status_t | Cy_CANFD_ConfigChangesEnable (CANFD_Type *base, uint32_t chan) |
| Enables the CPU write access to the protected configuration registers of the CAN FD block and sets the CAN FD block into the initialization state. More... | |
| __STATIC_INLINE cy_en_canfd_status_t | Cy_CANFD_ConfigChangesDisable (CANFD_Type *base, uint32_t chan) |
| Disables the CPU write access to the protected configuration registers of the CAN FD block and sets the CAN FD block into the Normal Operation. More... | |
| __STATIC_INLINE void | Cy_CANFD_TestModeConfig (CANFD_Type *base, uint32_t chan, cy_stc_canfd_test_mode_t testMode) |
| Configures test mode. More... | |
| __STATIC_INLINE void | Cy_CANFD_SetTDC (CANFD_Type *base, uint32_t chan, const cy_stc_canfd_transceiver_delay_compensation_t *tdcConfig) |
| Sets the CAN FD transceiver delay compensation offset. More... | |
| uint32_t | Cy_CANFD_GetLastError (CANFD_Type const *base, uint32_t chan) |
| Returns the value of Protocol Status Register (PSR). More... | |
| void | Cy_CANFD_IrqHandler (CANFD_Type *base, uint32_t chan, cy_stc_canfd_context_t const *context) |
| CAN FD (Status/Error/Rx/Tx) interrupt ISR. More... | |
| cy_en_canfd_status_t | Cy_CANFD_Init (CANFD_Type *base, uint32_t chan, const cy_stc_canfd_config_t *config, cy_stc_canfd_context_t *context) |
| Initializes the CAN FD module. More... | |
| cy_en_canfd_status_t | Cy_CANFD_DeInit (CANFD_Type *base, uint32_t chan, cy_stc_canfd_context_t *context) |
| De-initializes the CAN FD block, returns registers values to default. More... | |
| cy_en_canfd_status_t | Cy_CANFD_TransmitTxBuffer (CANFD_Type *base, uint32_t chan, uint8_t index) |
| Starts transmission of the message prepared with Cy_CANFD_TxBufferConfig(). More... | |
| cy_en_canfd_status_t | Cy_CANFD_UpdateAndTransmitMsgBuffer (CANFD_Type *base, uint32_t chan, const cy_stc_canfd_tx_buffer_t *txBuffer, uint8_t index, cy_stc_canfd_context_t const *context) |
| Updates the T0 and T1 Tx buffer element parameters in Message RAM and copies data from cy_stc_canfd_tx_buffer_t structure to Message RAM. More... | |
| cy_en_canfd_tx_buffer_status_t | Cy_CANFD_GetTxBufferStatus (CANFD_Type const *base, uint32_t chan, uint8_t index) |
| Gets the status of the CAN FD Tx buffer. More... | |
| __STATIC_INLINE uint32_t | Cy_CANFD_GetInterruptStatus (CANFD_Type const *base, uint32_t chan) |
| Returns a status of CAN FD interrupt requests. More... | |
| __STATIC_INLINE void | Cy_CANFD_ClearInterrupt (CANFD_Type *base, uint32_t chan, uint32_t status) |
| Clears CAN FD interrupts by setting each bit. More... | |
| __STATIC_INLINE uint32_t | Cy_CANFD_GetInterruptMask (CANFD_Type const *base, uint32_t chan) |
| Returns an interrupt mask. More... | |
| __STATIC_INLINE void | Cy_CANFD_SetInterruptMask (CANFD_Type *base, uint32_t chan, uint32_t interrupt) |
| Configures which bits of the interrupt request register can trigger an interrupt event. More... | |
| __STATIC_INLINE uint32_t | Cy_CANFD_GetInterruptLine (CANFD_Type const *base, uint32_t chan) |
| Returns the interrupt signals assigned to the line m_ttcan_int0 or m_ttcan_int1. More... | |
| __STATIC_INLINE void | Cy_CANFD_SetInterruptLine (CANFD_Type *base, uint32_t chan, uint32_t interruptLineMask) |
| Configures the bits of the Interrupt Line Select Register to assign the interrupt signal to the line m_ttcan_int0 or m_ttcan_int1. More... | |
| __STATIC_INLINE bool | Cy_CANFD_IsInterruptLineEnabled (CANFD_Type const *base, uint32_t chan, uint32_t interruptLineMask) |
| Checks whether Interrupt Line 0, Interrupt Line 1 or both are enabled. More... | |
| __STATIC_INLINE void | Cy_CANFD_EnableInterruptLine (CANFD_Type *base, uint32_t chan, uint32_t interruptLineMask) |
| Configures which interrupt line is enabled (Interrupt Line 0, Interrupt Line 1 or both). More... | |
| __STATIC_INLINE void Cy_CANFD_Enable | ( | CANFD_Type * | base, |
| uint32_t | channelMask | ||
| ) |
Enables the CAN FD channels.
| *base | The CAN FD registers structure pointer. |
| channelMask | The channel mask (0-0xFF). |
| __STATIC_INLINE cy_en_canfd_status_t Cy_CANFD_Disable | ( | CANFD_Type * | base, |
| uint32_t | channelMask | ||
| ) |
Disables the CAN FD channels to stop providing clocks to un-used CAN channels for power saving with this functionality.
| *base | The CAN FD registers structure pointer. |
| channelMask | The channel mask (0-0xFF). |
| __STATIC_INLINE void Cy_CANFD_EnableMRAM | ( | CANFD_Type * | base, |
| uint32_t | channelMask, | ||
| uint16_t | delay | ||
| ) |
Switches MRAM on and enables the channels.
| *base | The CAN FD registers structure pointer. |
| channelMask | The channel mask (0-0xFF). |
| delay | The delay in usec to wait power up time before MRAM can be used. Recommended value is 150 CPU cycles or 6 usec for the 25 MHz CPU clock. |
| __STATIC_INLINE cy_en_canfd_status_t Cy_CANFD_DisableMRAM | ( | CANFD_Type * | base | ) |
Disables the channels and switches MRAM off.
| *base | The CAN FD registers structure pointer. |
| __STATIC_INLINE void Cy_CANFD_SetBitrate | ( | CANFD_Type * | base, |
| uint32_t | chan, | ||
| const cy_stc_canfd_bitrate_t * | bitrate | ||
| ) |
Sets Nominal Bit Timing and Prescaler Register parameters: -Nominal Time segment after sample point; -Nominal Time segment before sample point; -Nominal Baud Rate Prescaler; -Nominal Synchronization Jump Width.
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| *bitrate | cy_stc_canfd_bitrate_t |
| __STATIC_INLINE void Cy_CANFD_SetFastBitrate | ( | CANFD_Type * | base, |
| uint32_t | chan, | ||
| const cy_stc_canfd_bitrate_t * | fastBitrate | ||
| ) |
Sets Data Bit Timing and Prescaler Register parameters for data: -Data Time segment after sample point; -Data Time segment before sample point; -Data Baud Rate Prescaler; -Data Synchronization Jump Width.
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| *fastBitrate | cy_stc_canfd_bitrate_t |
| void Cy_CANFD_SidFilterSetup | ( | CANFD_Type const * | base, |
| uint32_t | chan, | ||
| const cy_stc_id_filter_t * | filter, | ||
| uint32_t | index, | ||
| cy_stc_canfd_context_t const * | context | ||
| ) |
Updates the Standard Message ID Filter Element configuration in Message RAM.
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| *filter | The SID Filter register element structure. |
| index | The SID filter index. |
| *context | The pointer to the context structure cy_stc_canfd_context_t allocated by the user. The structure is used during the CAN FD operation for internal configuration and data retention. The user must not modify anything in this structure. |
| void Cy_CANFD_SidFiltersSetup | ( | CANFD_Type const * | base, |
| uint32_t | chan, | ||
| const cy_stc_canfd_sid_filter_config_t * | filterConfig, | ||
| cy_stc_canfd_context_t const * | context | ||
| ) |
Updates the Standard Message ID Filters configuration in Message RAM.
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| filterConfig | The Standard ID filter configuration structure. |
| context | The pointer to the context structure cy_stc_canfd_context_t allocated by the user. The structure is used during the CAN FD operation for internal configuration and data retention. The user must not modify anything in this structure. |
| void Cy_CANFD_XidFilterSetup | ( | CANFD_Type const * | base, |
| uint32_t | chan, | ||
| const cy_stc_extid_filter_t * | filter, | ||
| uint32_t | index, | ||
| cy_stc_canfd_context_t const * | context | ||
| ) |
Updates the Extended Message ID Filter Element configuration in Message RAM.
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| filter | The XID Filter register element structure. |
| index | The XID filter index. |
| context | The pointer to the context structure cy_stc_canfd_context_t allocated by the user. The structure is used during the CAN FD operation for internal configuration and data retention. The user must not modify anything in this structure. |
| void Cy_CANFD_XidFiltersSetup | ( | CANFD_Type const * | base, |
| uint32_t | chan, | ||
| const cy_stc_canfd_extid_filter_config_t * | filterConfig, | ||
| cy_stc_canfd_context_t const * | context | ||
| ) |
Updates the Extended Message ID Filters configuration in Message RAM.
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| filterConfig | The Extended ID filter configuration structure. |
| context | The pointer to the context structure cy_stc_canfd_context_t allocated by the user. The structure is used during the CAN FD operation for internal configuration and data retention. The user must not modify anything in this structure. |
| cy_en_canfd_status_t Cy_CANFD_TxBufferConfig | ( | CANFD_Type const * | base, |
| uint32_t | chan, | ||
| const cy_stc_canfd_tx_buffer_t * | txBuffer, | ||
| uint8_t | index, | ||
| cy_stc_canfd_context_t const * | context | ||
| ) |
Updates the T0 and T1 Tx buffer element parameters in Message RAM and copies data from cy_stc_canfd_tx_buffer_t structure to Message RAM.
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| *txBuffer | The Tx Buffer configuration structure. |
| index | the message buffer index (0-31). |
| context | The pointer to the context structure cy_stc_canfd_context_t allocated by the user. The structure is used during the CAN FD operation for internal configuration and data retention. The user must not modify anything in this structure. |
| uint32_t Cy_CANFD_CalcRxBufAdrs | ( | CANFD_Type const * | base, |
| uint32_t | chan, | ||
| uint32_t | index, | ||
| cy_stc_canfd_context_t const * | context | ||
| ) |
Calculates the address of the RX buffer element.
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| index | The message buffer index for reception (0-63). |
| context | The pointer to the context structure cy_stc_canfd_context_t allocated by the user. The structure is used during the CAN FD operation for internal configuration and data retention. The user must not modify anything in this structure. |
| uint32_t Cy_CANFD_CalcRxFifoAdrs | ( | CANFD_Type const * | base, |
| uint32_t | chan, | ||
| uint32_t | fifoNumber, | ||
| uint32_t | index, | ||
| cy_stc_canfd_context_t const * | context | ||
| ) |
Calculates the address of the RX FIFO element.
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| fifoNumber | The FIFO number (0 or 1). |
| index | The Message buffer index for the reception (0-63). |
| context | The pointer to the context structure cy_stc_canfd_context_t allocated by the user. The structure is used during the CAN FD operation for internal configuration and data retention. The user must not modify anything in this structure. |
| cy_en_canfd_status_t Cy_CANFD_GetRxBuffer | ( | CANFD_Type const * | base, |
| uint32_t | chan, | ||
| const uint32_t | bufferAddress, | ||
| cy_stc_canfd_rx_buffer_t const * | rxBuffer | ||
| ) |
Extracts the RX Buffer from Message RAM.
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| bufferAddress | The Rx, FIFO 0 or FIFO 1 Buffer element address in CAN Message RAM. |
| *rxBuffer | The Rx Buffer structure in RAM. |
| cy_en_canfd_status_t Cy_CANFD_GetFIFOTop | ( | CANFD_Type const * | base, |
| uint32_t | chan, | ||
| const uint8_t | FIFONumber, | ||
| cy_stc_canfd_rx_buffer_t const * | rxBuffer | ||
| ) |
Extracts one RX FIFO Buffer element using the FIFO TOP register logic.
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| FIFONumber | The CY_CANFD_RX_FIFO0 or CY_CANFD_RX_FIFO1, FIFO Buffer number. |
| *rxBuffer | The Rx Buffer structure in RAM. |
| cy_en_canfd_status_t Cy_CANFD_ExtractMsgFromRXBuffer | ( | CANFD_Type * | base, |
| uint32_t | chan, | ||
| bool | rxFIFOMsg, | ||
| uint8_t | msgBufOrRxFIFONum, | ||
| cy_stc_canfd_rx_buffer_t const * | rxBuffer, | ||
| cy_stc_canfd_context_t const * | context | ||
| ) |
Extracts one RX buffer or one FIFO buffer element.
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| rxFIFOMsg | The buffer to read: True for FIFO buffers and False for RX buffers. |
| msgBufOrRxFIFONum | The RX buffer element index or FIFO buffer number. |
| *rxBuffer | The Rx buffer structure in RAM. |
| context | The pointer to the context structure cy_stc_canfd_context_t allocated by the user. The structure is used during the CAN FD operation for internal configuration and data retention. The user must not modify anything in this structure. |
| void Cy_CANFD_AckRxBuf | ( | CANFD_Type * | base, |
| uint32_t | chan, | ||
| uint32_t | bufNum | ||
| ) |
Acknowledges the data reading and makes the buffer element available for a next message.
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| bufNum | The RX buffer element index. |
| void Cy_CANFD_AckRxFifo | ( | CANFD_Type * | base, |
| uint32_t | chan, | ||
| uint32_t | FIFOnumber | ||
| ) |
Acknowledges the data reading and makes the buffer element available for a next message.
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| FIFOnumber | The RX buffer element index. |
| __STATIC_INLINE cy_en_canfd_status_t Cy_CANFD_ConfigChangesEnable | ( | CANFD_Type * | base, |
| uint32_t | chan | ||
| ) |
Enables the CPU write access to the protected configuration registers of the CAN FD block and sets the CAN FD block into the initialization state.
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| __STATIC_INLINE cy_en_canfd_status_t Cy_CANFD_ConfigChangesDisable | ( | CANFD_Type * | base, |
| uint32_t | chan | ||
| ) |
Disables the CPU write access to the protected configuration registers of the CAN FD block and sets the CAN FD block into the Normal Operation.
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| __STATIC_INLINE void Cy_CANFD_TestModeConfig | ( | CANFD_Type * | base, |
| uint32_t | chan, | ||
| cy_stc_canfd_test_mode_t | testMode | ||
| ) |
Configures test mode.
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| testMode | cy_stc_canfd_test_mode_t |
| __STATIC_INLINE void Cy_CANFD_SetTDC | ( | CANFD_Type * | base, |
| uint32_t | chan, | ||
| const cy_stc_canfd_transceiver_delay_compensation_t * | tdcConfig | ||
| ) |
Sets the CAN FD transceiver delay compensation offset.
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| *tdcConfig | The CAN FD transceiver delay compensation offset configuration. |
| uint32_t Cy_CANFD_GetLastError | ( | CANFD_Type const * | base, |
| uint32_t | chan | ||
| ) |
Returns the value of Protocol Status Register (PSR).
Use the Protocol Status Register (PSR) masks to extract necessary fields from the register.
Use the cy_en_canfd_LEC_t enumeration to interpret LEC and DLEC fields.
Use the cy_en_canfd_PSR_ACT_t enumeration to interpret the ACT field.
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| void Cy_CANFD_IrqHandler | ( | CANFD_Type * | base, |
| uint32_t | chan, | ||
| cy_stc_canfd_context_t const * | context | ||
| ) |
CAN FD (Status/Error/Rx/Tx) interrupt ISR.
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| context | The pointer to the context structure cy_stc_canfd_context_t allocated by the user. The structure is used during the CAN FD operation for internal configuration and data retention. The user must not modify anything in this structure. |
| cy_en_canfd_status_t Cy_CANFD_Init | ( | CANFD_Type * | base, |
| uint32_t | chan, | ||
| const cy_stc_canfd_config_t * | config, | ||
| cy_stc_canfd_context_t * | context | ||
| ) |
Initializes the CAN FD module.
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| *config | The pointer to the CAN FD configuration structure. |
| *context | The pointer to the context structure cy_stc_canfd_context_t allocated by the user. The structure is used during the CAN FD operation for internal configuration and data retention. User must not modify anything in this structure. |
| cy_en_canfd_status_t Cy_CANFD_DeInit | ( | CANFD_Type * | base, |
| uint32_t | chan, | ||
| cy_stc_canfd_context_t * | context | ||
| ) |
De-initializes the CAN FD block, returns registers values to default.
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| *context | The pointer to the context structure cy_stc_canfd_context_t allocated by the user. The structure is used during the CAN FD operation for internal configuration and data retention. The user must not modify anything in this structure. |
| cy_en_canfd_status_t Cy_CANFD_TransmitTxBuffer | ( | CANFD_Type * | base, |
| uint32_t | chan, | ||
| uint8_t | index | ||
| ) |
Starts transmission of the message prepared with Cy_CANFD_TxBufferConfig().
Transmits the message immediately. Function CanFD_Init() must be called before setting up the identifier and enabling this message buffer.
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| index | Message buffer index (0-31). |
| cy_en_canfd_status_t Cy_CANFD_UpdateAndTransmitMsgBuffer | ( | CANFD_Type * | base, |
| uint32_t | chan, | ||
| const cy_stc_canfd_tx_buffer_t * | txBuffer, | ||
| uint8_t | index, | ||
| cy_stc_canfd_context_t const * | context | ||
| ) |
Updates the T0 and T1 Tx buffer element parameters in Message RAM and copies data from cy_stc_canfd_tx_buffer_t structure to Message RAM.
Transmits the message immediately. Function CanFD_Init() must be called before setting up the identifier and enabling this message buffer.
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| *txBuffer | The Tx Buffer configuration structure. |
| index | the message buffer index (0-31). |
| context | The pointer to the context structure cy_stc_canfd_context_t allocated by the user. The structure is used during the CAN FD operation for internal configuration and data retention. The user must not modify anything in this structure. |
| cy_en_canfd_tx_buffer_status_t Cy_CANFD_GetTxBufferStatus | ( | CANFD_Type const * | base, |
| uint32_t | chan, | ||
| uint8_t | index | ||
| ) |
Gets the status of the CAN FD Tx buffer.
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| index | Message buffer index (0-31). |
| __STATIC_INLINE uint32_t Cy_CANFD_GetInterruptStatus | ( | CANFD_Type const * | base, |
| uint32_t | chan | ||
| ) |
Returns a status of CAN FD interrupt requests.
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| __STATIC_INLINE void Cy_CANFD_ClearInterrupt | ( | CANFD_Type * | base, |
| uint32_t | chan, | ||
| uint32_t | status | ||
| ) |
Clears CAN FD interrupts by setting each bit.
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| status | The bitmask of statuses to clear. Valid masks can be found in RX Interrupt masks, TX Interrupt masks and Error Interrupt masks. |
| __STATIC_INLINE uint32_t Cy_CANFD_GetInterruptMask | ( | CANFD_Type const * | base, |
| uint32_t | chan | ||
| ) |
Returns an interrupt mask.
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| __STATIC_INLINE void Cy_CANFD_SetInterruptMask | ( | CANFD_Type * | base, |
| uint32_t | chan, | ||
| uint32_t | interrupt | ||
| ) |
Configures which bits of the interrupt request register can trigger an interrupt event.
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| interrupt | The bit field determines which status changes can cause an interrupt. Valid masks can be found in RX Interrupt masks, TX Interrupt masks and Error Interrupt masks. |
| __STATIC_INLINE uint32_t Cy_CANFD_GetInterruptLine | ( | CANFD_Type const * | base, |
| uint32_t | chan | ||
| ) |
Returns the interrupt signals assigned to the line m_ttcan_int0 or m_ttcan_int1.
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| __STATIC_INLINE void Cy_CANFD_SetInterruptLine | ( | CANFD_Type * | base, |
| uint32_t | chan, | ||
| uint32_t | interruptLineMask | ||
| ) |
Configures the bits of the Interrupt Line Select Register to assign the interrupt signal to the line m_ttcan_int0 or m_ttcan_int1.
Bit = 0: The interrupt assigned to the interrupt line m_ttcan_int0, bit = 1: The interrupt assigned to the interrupt line m_ttcan_int1.
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| interruptLineMask | The mask where 1 corresponds to the interrupt signals assigned to the line m_ttcan_int1 and 0 corresponds to m_ttcan_int0. Valid masks can be found in RX Interrupt masks, TX Interrupt masks and Error Interrupt masks. |
| __STATIC_INLINE bool Cy_CANFD_IsInterruptLineEnabled | ( | CANFD_Type const * | base, |
| uint32_t | chan, | ||
| uint32_t | interruptLineMask | ||
| ) |
Checks whether Interrupt Line 0, Interrupt Line 1 or both are enabled.
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| interruptLineMask | The bit mask to check which interrupt line is enabled. Can be CY_CANFD_INTERRUPT_LINE_0_EN, CY_CANFD_INTERRUPT_LINE_1_EN or (CY_CANFD_INTERRUPT_LINE_0_EN | CY_CANFD_INTERRUPT_LINE_1_EN) |
| __STATIC_INLINE void Cy_CANFD_EnableInterruptLine | ( | CANFD_Type * | base, |
| uint32_t | chan, | ||
| uint32_t | interruptLineMask | ||
| ) |
Configures which interrupt line is enabled (Interrupt Line 0, Interrupt Line 1 or both).
| *base | The pointer to a CAN FD instance. |
| chan | The CAN FD channel number. |
| interruptLineMask | The bit mask whose bits define interrupt lines to enable or disable. |