STM32G0 MCAL 0.0.1
Tiny MCAL for educational purpose.
Loading...
Searching...
No Matches
CanIf.h
Go to the documentation of this file.
1
12#ifndef CANIF_H__
13#define CANIF_H__
14
15#include "CanIf_Cfg.h"
16
17
18void CanIf_Init( const CanIf_ConfigType *ConfigPtr );
19void CanIf_DeInit( void );
23Std_ReturnType CanIf_Transmit( PduIdType TxPduId, const PduInfoType *PduInfoPtr );
24#if CANIF_PUBLIC_READ_RX_PDU_DATA == STD_ON /* cppcheck-suppress misra-c2012-20.9 ; it is necesary to use a define for this function */
25Std_ReturnType CanIf_ReadRxPduData( PduIdType CanIfRxSduId, PduInfoType *CanIfRxInfoPtr );
26#endif
27#if CANIF_PUBLIC_READ_TX_PDU_NOTIFY_STATUS == STD_ON /* cppcheck-suppress misra-c2012-20.9 ; it is necesary to use a define for this function */
28CanIf_NotifStatusType CanIf_ReadTxNotifStatus( PduIdType CanIfTxSduId );
29#endif
30#if CANIF_PUBLIC_READ_RX_PDU_NOTIFY_STATUS == STD_ON /* cppcheck-suppress misra-c2012-20.9 ; it is necesary to use a define for this function */
31CanIf_NotifStatusType CanIf_ReadRxNotifStatus( PduIdType CanIfRxSduId );
32#endif
33Std_ReturnType CanIf_SetPduMode( uint8 ControllerId, CanIf_PduModeType PduModeRequest );
34Std_ReturnType CanIf_GetPduMode( uint8 ControllerId, CanIf_PduModeType *PduModePtr );
35#if CANIF_VERSION_INFO_API == STD_ON /* cppcheck-suppress misra-c2012-20.9 ; it is necesary to use a define for this function */
36void CanIf_GetVersionInfo( Std_VersionInfoType *VersionInfo );
37#endif
38void CanIf_SetDynamicTxId( PduIdType CanIfTxSduId, Can_IdType CanId );
40#if CANIF_SET_BAUDRATE_API == STD_ON /* cppcheck-suppress misra-c2012-20.9 ; it is necesary to use a define for this function */
41Std_ReturnType CanIf_SetBaudrate( uint8 ControllerId, uint16 BaudRateConfigID );
42#endif
43Std_ReturnType CanIf_GetControllerRxErrorCounter( uint8 ControllerId, uint8 *RxErrorCounterPtr );
44Std_ReturnType CanIf_GetControllerTxErrorCounter( uint8 ControllerId, uint8 *TxErrorCounterPtr );
45#if CANIF_BUS_MIRRORING_SUPPORT == STD_ON /* cppcheck-suppress misra-c2012-20.9 ; it is necesary to use a define for this function */
46Std_ReturnType CanIf_EnableBusMirroring( uint8 ControllerId, boolean MirroringActive );
47#endif
48#if CANIF_GLOBAL_TIME_SUPPORT == STD_ON /* cppcheck-suppress misra-c2012-20.9 ; it is necesary to use a define for this function */
49Std_ReturnType CanIf_GetCurrentTime( uint8 Controller, Can_TimeStampType *timeStampPtr );
50void CanIf_EnableEgressTimeStamp( PduIdType TxPduId );
51Std_ReturnType CanIf_GetEgressTimeStamp( PduIdType TxPduId, Can_TimeStampType *timeStampPtr );
52Std_ReturnType CanIf_GetIngressTimeStamp( PduIdType RxPduId, Can_TimeStampType *timeStampPtr );
53#endif
54
55#endif // CANIF_H__
Std_ReturnType CanIf_GetControllerRxErrorCounter(uint8 ControllerId, uint8 *RxErrorCounterPtr)
Gets the CAN controller Rx error counter.
Definition CanIf.c:695
Std_ReturnType CanIf_Transmit(PduIdType TxPduId, const PduInfoType *PduInfoPtr)
Transmits a CAN L-PDU.
Definition CanIf.c:242
Std_ReturnType CanIf_GetControllerErrorState(uint8 ControllerId, Can_ErrorStateType *ErrorStatePtr)
Gets the CAN controller error state.
Definition CanIf.c:194
void CanIf_DeInit(void)
Deinitializes the CAN interface.
Definition CanIf.c:66
Std_ReturnType CanIf_GetPduMode(uint8 ControllerId, CanIf_PduModeType *PduModePtr)
Gets the requested PDU mode.
Definition CanIf.c:493
CanIf_NotifStatusType CanIf_GetTxConfirmationState(uint8 ControllerId)
Gets the CAN controller Tx confirmation state.
Definition CanIf.c:611
void CanIf_SetDynamicTxId(PduIdType CanIfTxSduId, Can_IdType CanId)
Sets the CAN controller baudrate.
Definition CanIf.c:570
Std_ReturnType CanIf_GetControllerMode(uint8 ControllerId, Can_ControllerStateType *ControllerModePtr)
Gets the CAN controller mode.
Definition CanIf.c:144
Std_ReturnType CanIf_SetPduMode(uint8 ControllerId, CanIf_PduModeType PduModeRequest)
Sets the requested PDU mode.
Definition CanIf.c:447
void CanIf_Init(const CanIf_ConfigType *ConfigPtr)
Initializes the CAN interface.
Definition CanIf.c:53
Std_ReturnType CanIf_GetControllerTxErrorCounter(uint8 ControllerId, uint8 *TxErrorCounterPtr)
Gets the CAN controller Tx error counter.
Definition CanIf.c:744
Std_ReturnType CanIf_SetControllerMode(uint8 ControllerId, Can_ControllerStateType ControllerMode)
Sets the CAN controller mode.
Definition CanIf.c:95
enum _CanIf_PduModeType CanIf_PduModeType
Pdu mode type.
struct _CanIf_ConfigType CanIf_ConfigType
Configuration structure for the CAN interface.
enum _CanIf_NotifStatusType CanIf_NotifStatusType
Notification status type.
struct _Can_TimeStampType Can_TimeStampType
CAN Controller Tiemstamp
enum _Can_ControllerStateType Can_ControllerStateType
States that are used by the several ControllerMode functions.
uint32 Can_IdType
Represents the Identifier of an L-PDU. The two most significant bits specify the frame type: 00 CAN m...
Definition Can_GeneralTypes.h:18
enum _Can_ErrorStateType Can_ErrorStateType
Error states of a CAN controller.
uint8 PduIdType
This type is used within the entire AUTOSAR Com Stack except for bus drivers.
Definition ComStack_Types.h:28
unsigned short uint16
Definition Platform_Types.h:96
unsigned char uint8
Definition Platform_Types.h:94
struct Std_VersionInfoType_Tag Std_VersionInfoType
This structure is used to request the version of a BSW module using the [Module name]_GetVersionInfo(...
uint8 Std_ReturnType
This type can be used as standard API return type which is shared between the RTE and the BSW modules...
Definition Std_Types.h:22
This variables shall be used to store the basic information about a PDU.
Definition ComStack_Types.h:58