123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190 |
- #ifndef SPI_IPW_H
- #define SPI_IPW_H
- #ifdef __cplusplus
- extern "C"{
- #endif
- #include "Spi.h"
- #include "Lpspi_Ip.h"
- #include "Flexio_Spi_Ip.h"
- #include "Spi_IPW_Types.h"
- #define SPI_IPW_VENDOR_ID 43
- #define SPI_IPW_AR_RELEASE_MAJOR_VERSION 4
- #define SPI_IPW_AR_RELEASE_MINOR_VERSION 4
- #define SPI_IPW_AR_RELEASE_REVISION_VERSION 0
- #define SPI_IPW_SW_MAJOR_VERSION 1
- #define SPI_IPW_SW_MINOR_VERSION 0
- #define SPI_IPW_SW_PATCH_VERSION 0
- #if (SPI_VENDOR_ID != SPI_IPW_VENDOR_ID)
- #error "Spi.h and Spi_IPW.h have different vendor ids"
- #endif
- #if ((SPI_AR_RELEASE_MAJOR_VERSION != SPI_IPW_AR_RELEASE_MAJOR_VERSION) || \
- (SPI_AR_RELEASE_MINOR_VERSION != SPI_IPW_AR_RELEASE_MINOR_VERSION) || \
- (SPI_AR_RELEASE_REVISION_VERSION != SPI_IPW_AR_RELEASE_REVISION_VERSION))
- #error "AutoSar Version Numbers of Spi.h and Spi_IPW.h are different"
- #endif
- #if ((SPI_SW_MAJOR_VERSION != SPI_IPW_SW_MAJOR_VERSION) || \
- (SPI_SW_MINOR_VERSION != SPI_IPW_SW_MINOR_VERSION) || \
- (SPI_SW_PATCH_VERSION != SPI_IPW_SW_PATCH_VERSION))
- #error "Software Version Numbers of Spi.h and Spi_IPW.h are different"
- #endif
- #if (SPI_IPW_VENDOR_ID != FLEXIO_SPI_IP_VENDOR_ID)
- #error "Spi_IPW.h and Flexio_Spi_Ip.h have different vendor ids"
- #endif
- #if ((SPI_IPW_AR_RELEASE_MAJOR_VERSION != FLEXIO_SPI_IP_AR_RELEASE_MAJOR_VERSION) || \
- (SPI_IPW_AR_RELEASE_MINOR_VERSION != FLEXIO_SPI_IP_AR_RELEASE_MINOR_VERSION) || \
- (SPI_IPW_AR_RELEASE_REVISION_VERSION != FLEXIO_SPI_IP_AR_RELEASE_REVISION_VERSION))
- #error "AutoSar Version Numbers of Spi_IPW.h and Flexio_Spi_Ip.h are different"
- #endif
- #if ((SPI_IPW_SW_MAJOR_VERSION != FLEXIO_SPI_IP_SW_MAJOR_VERSION) || \
- (SPI_IPW_SW_MINOR_VERSION != FLEXIO_SPI_IP_SW_MINOR_VERSION) || \
- (SPI_IPW_SW_PATCH_VERSION != FLEXIO_SPI_IP_SW_PATCH_VERSION))
- #error "Software Version Numbers of Spi_IPW.h and Flexio_Spi_Ip.h are different"
- #endif
- #if (LPSPI_IP_VENDOR_ID != SPI_IPW_VENDOR_ID)
- #error "Lpspi_Ip.h and Spi_IPW.h have different vendor ids"
- #endif
- #if ((LPSPI_IP_AR_RELEASE_MAJOR_VERSION != SPI_IPW_AR_RELEASE_MAJOR_VERSION) || \
- (LPSPI_IP_AR_RELEASE_MINOR_VERSION != SPI_IPW_AR_RELEASE_MINOR_VERSION) || \
- (LPSPI_IP_AR_RELEASE_REVISION_VERSION != SPI_IPW_AR_RELEASE_REVISION_VERSION))
- #error "AutoSar Version Numbers of Lpspi_Ip.h and Spi_IPW.h are different"
- #endif
- #if ((LPSPI_IP_SW_MAJOR_VERSION != SPI_IPW_SW_MAJOR_VERSION) || \
- (LPSPI_IP_SW_MINOR_VERSION != SPI_IPW_SW_MINOR_VERSION) || \
- (LPSPI_IP_SW_PATCH_VERSION != SPI_IPW_SW_PATCH_VERSION))
- #error "Software Version Numbers of Lpspi_Ip.h and Spi_IPW.h are different"
- #endif
- #if (SPI_IPW_TYPES_VENDOR_ID != SPI_IPW_VENDOR_ID)
- #error "Spi_IPW_Types.h and Spi_IPW.h have different vendor ids"
- #endif
- #if ((SPI_IPW_TYPES_AR_RELEASE_MAJOR_VERSION != SPI_IPW_AR_RELEASE_MAJOR_VERSION) || \
- (SPI_IPW_TYPES_AR_RELEASE_MINOR_VERSION != SPI_IPW_AR_RELEASE_MINOR_VERSION) || \
- (SPI_IPW_TYPES_AR_RELEASE_REVISION_VERSION != SPI_IPW_AR_RELEASE_REVISION_VERSION))
- #error "AutoSar Version Numbers of Spi_IPW_Types.h and Spi_IPW.h are different"
- #endif
- #if ((SPI_IPW_TYPES_SW_MAJOR_VERSION != SPI_IPW_SW_MAJOR_VERSION) || \
- (SPI_IPW_TYPES_SW_MINOR_VERSION != SPI_IPW_SW_MINOR_VERSION) || \
- (SPI_IPW_TYPES_SW_PATCH_VERSION != SPI_IPW_SW_PATCH_VERSION))
- #error "Software Version Numbers of Spi_IPW_Types.h and Spi_IPW.h are different"
- #endif
- #define SPI_START_SEC_CODE
- #include "Spi_MemMap.h"
- void Spi_Ipw_Init(const Spi_HWUnitType HWUnitId, const Spi_HWUnitConfigType * HWUnit);
- void Spi_Ipw_DeInit(Spi_HWUnitType HWUnit, uint32 SpiCoreID);
- #if ( (SPI_LEVEL_DELIVERED == LEVEL2) || (SPI_LEVEL_DELIVERED == LEVEL0))
- Std_ReturnType Spi_Ipw_SyncTransmit(const Spi_JobConfigType *JobConfig, uint32 SpiCoreID);
- #endif
- #if ((SPI_LEVEL_DELIVERED == LEVEL1) || (SPI_LEVEL_DELIVERED == LEVEL2))
- void Spi_Ipw_JobTransfer(const Spi_JobConfigType *JobConfig);
- #endif
- #if ((SPI_LEVEL_DELIVERED == LEVEL1) || (SPI_LEVEL_DELIVERED == LEVEL2))
- void Spi_Ipw_IrqPoll(Spi_HWUnitType HWUnit, uint32 SpiCoreID);
- #endif
- #if ((SPI_LEVEL_DELIVERED == LEVEL1) || (SPI_LEVEL_DELIVERED == LEVEL2))
- void Spi_Ipw_IrqConfig(Spi_HWUnitType HWUnit, Spi_AsyncModeType Mode, uint32 SpiCoreID);
- #endif
- #if ((SPI_SLAVE_SUPPORT == STD_ON) && (SPI_CANCEL_API == STD_ON))
- #if ((SPI_LEVEL_DELIVERED == LEVEL1) || (SPI_LEVEL_DELIVERED == LEVEL2))
- void Spi_Ipw_SlaveCancel(const Spi_JobConfigType *JobConfig);
- #endif
- #endif
- #if (SPI_DUAL_CLOCK_MODE == STD_ON)
- void Spi_Ipw_SetClockMode(Spi_DualClockModeType ClockMode, const Spi_HWUnitConfigType * HWUnitConfig);
- #endif
- #define SPI_STOP_SEC_CODE
- #include "Spi_MemMap.h"
- #ifdef __cplusplus
- }
- #endif
- #endif
|