# 1 "../../../mcal/Spi_ZX_K14xM/Src/Spi_Drvw.c" # 1 "" 1 # 1 "" 3 # 387 "" 3 # 1 "" 1 # 1 "" 2 # 1 "../../../mcal/Spi_ZX_K14xM/Src/Spi_Drvw.c" 2 # 26 "../../../mcal/Spi_ZX_K14xM/Src/Spi_Drvw.c" # 1 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drvw.h" 1 # 29 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drvw.h" # 1 "../../../mcal/Spi_ZX_K14xM/Inc/Spi_Drvw_Types.h" 1 # 28 "../../../mcal/Spi_ZX_K14xM/Inc/Spi_Drvw_Types.h" # 1 "../Generated/inc\\Spi_Drvw_Cfg.h" 1 # 28 "../Generated/inc\\Spi_Drvw_Cfg.h" # 1 "../Generated/inc/Spi_Drvw_PBcfg.h" 1 # 29 "../Generated/inc\\Spi_Drvw_Cfg.h" 2 # 29 "../../../mcal/Spi_ZX_K14xM/Inc/Spi_Drvw_Types.h" 2 # 1 "../../../mcal/Spi_ZX_K14xM/Inc/Spi_Drv_Types.h" 1 # 28 "../../../mcal/Spi_ZX_K14xM/Inc/Spi_Drv_Types.h" # 1 "../../../mcal/Base_ZX_K14xM/Inc\\Std_Types.h" 1 # 30 "../../../mcal/Base_ZX_K14xM/Inc\\Std_Types.h" # 1 "../../../mcal/Base_ZX_K14xM/Inc/Platform_Types.h" 1 # 86 "../../../mcal/Base_ZX_K14xM/Inc/Platform_Types.h" typedef unsigned char boolean; typedef unsigned char uint8; typedef unsigned short uint16; typedef unsigned int uint32; typedef unsigned long long uint64; typedef signed char sint8; typedef signed short sint16; typedef signed int sint32; typedef signed long long sint64; typedef unsigned long uint8_least; typedef unsigned long uint16_least; typedef unsigned long uint32_least; typedef signed long sint8_least; typedef signed long sint16_least; typedef signed long sint32_least; typedef float float32; typedef double float64; typedef void *VoidPtr; typedef const void *ConstVoidPtr; # 31 "../../../mcal/Base_ZX_K14xM/Inc\\Std_Types.h" 2 # 1 "../../../mcal/Base_ZX_K14xM/Inc/Compiler.h" 1 # 31 "../../../mcal/Base_ZX_K14xM/Inc/Compiler.h" # 1 "../../../mcal/Base_ZX_K14xM/Inc/Compiler_Cfg.h" 1 # 32 "../../../mcal/Base_ZX_K14xM/Inc/Compiler.h" 2 # 32 "../../../mcal/Base_ZX_K14xM/Inc\\Std_Types.h" 2 # 63 "../../../mcal/Base_ZX_K14xM/Inc\\Std_Types.h" typedef unsigned char StatusType; # 104 "../../../mcal/Base_ZX_K14xM/Inc\\Std_Types.h" typedef uint8 Std_ReturnType; typedef uint8 Std_TransformerClass; typedef uint8 Std_TransformerForwardCode; typedef uint8 Std_MessageTypeType; typedef uint8 Std_MessageResultType; typedef struct { uint16 vendorID; uint16 moduleID; uint8 sw_major_version; uint8 sw_minor_version; uint8 sw_patch_version; } Std_VersionInfoType; typedef struct { uint8 errorCode; Std_TransformerClass transformerClass; } Std_TransformerError; typedef struct { Std_TransformerForwardCode errorCode; Std_TransformerClass transformerClass; } Std_TransformerForward; typedef Std_ReturnType (*Std_ExtractProtocolHeaderFieldsType)(const uint8 *buffer, uint32 bufferLength, Std_MessageTypeType *messageType, Std_MessageResultType *messageResult); # 29 "../../../mcal/Spi_ZX_K14xM/Inc/Spi_Drv_Types.h" 2 # 1 "../../../mcal/McalLib_ZX_K14xM/Inc\\McalLib.h" 1 # 29 "../../../mcal/McalLib_ZX_K14xM/Inc\\McalLib.h" # 1 "../../../mcal/McalLib_ZX_K14xM/Inc/McalLib_Compiler.h" 1 # 30 "../../../mcal/McalLib_ZX_K14xM/Inc/McalLib_Compiler.h" # 1 "../Generated/inc\\McalLib_Cfg.h" 1 # 31 "../../../mcal/McalLib_ZX_K14xM/Inc/McalLib_Compiler.h" 2 # 273 "../../../mcal/McalLib_ZX_K14xM/Inc/McalLib_Compiler.h" static inline uint32 McalLib_ReadControlReg(void) { uint32 res; __asm("MRS %0,CONTROL" : "=r" (res)); return res; } # 290 "../../../mcal/McalLib_ZX_K14xM/Inc/McalLib_Compiler.h" static inline uint32 McalLib_ReadIpsrReg(void) { uint32 res; __asm("MRS %0,IPSR" : "=r" (res)); return res; } # 305 "../../../mcal/McalLib_ZX_K14xM/Inc/McalLib_Compiler.h" static inline uint32 McalLib_ReadPriMaskReg(void) { uint32 res; __asm("MRS %0,PRIMASK" : "=r" (res)); return res; } # 30 "../../../mcal/McalLib_ZX_K14xM/Inc\\McalLib.h" 2 # 184 "../../../mcal/McalLib_ZX_K14xM/Inc\\McalLib.h" typedef enum { MCALLIB_COUNTER_SOFTWARE, MCALLIB_COUNTER_OS, } McalLib_CounterType; typedef struct { uint32 CounterId; uint32 CounterFreq; } McalLib_ConfigType; # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\McalLib_MemMap.h" 1 # 876 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\McalLib_MemMap.h" #pragma clang section rodata = ".mcal_config_data" # 211 "../../../mcal/McalLib_ZX_K14xM/Inc\\McalLib.h" 2 extern const McalLib_ConfigType *const McalLib_PreDefinedConfigPtr[(1U)]; # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\McalLib_MemMap.h" 1 # 892 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\McalLib_MemMap.h" #pragma clang section rodata = "" # 216 "../../../mcal/McalLib_ZX_K14xM/Inc\\McalLib.h" 2 # 230 "../../../mcal/McalLib_ZX_K14xM/Inc\\McalLib.h" extern void Sys_SystemReset(void); # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\McalLib_MemMap.h" 1 # 1072 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\McalLib_MemMap.h" #pragma clang section text = ".mcal_code" # 234 "../../../mcal/McalLib_ZX_K14xM/Inc\\McalLib.h" 2 void McalLib_Init(void); # 254 "../../../mcal/McalLib_ZX_K14xM/Inc\\McalLib.h" Std_ReturnType McalLib_GetCounterValue(McalLib_CounterType Counter, uint32 *Value); # 270 "../../../mcal/McalLib_ZX_K14xM/Inc\\McalLib.h" Std_ReturnType McalLib_GetElapsedValue(McalLib_CounterType Counter, uint32 *const CounterValue, uint32 *ElapsedValue); # 282 "../../../mcal/McalLib_ZX_K14xM/Inc\\McalLib.h" uint32 McalLib_MicroSecToTicks(McalLib_CounterType Counter, uint32 MicroSecond); # 296 "../../../mcal/McalLib_ZX_K14xM/Inc\\McalLib.h" void McalLib_SetCounterFreq(McalLib_CounterType Counter, uint32 Freq); # 309 "../../../mcal/McalLib_ZX_K14xM/Inc\\McalLib.h" static inline void McalLib_Assert(const uint8 *File, uint32 Line) { (void)File; (void)Line; for (;;) { } } # 327 "../../../mcal/McalLib_ZX_K14xM/Inc\\McalLib.h" void McalLib_SuspendAllInterrupts(void); void McalLib_ResumeAllInterrupts(void); # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\McalLib_MemMap.h" 1 # 1088 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\McalLib_MemMap.h" #pragma clang section text = "" # 339 "../../../mcal/McalLib_ZX_K14xM/Inc\\McalLib.h" 2 # 30 "../../../mcal/Spi_ZX_K14xM/Inc/Spi_Drv_Types.h" 2 # 1 "../Generated/inc\\Spi_Drv_Cfg.h" 1 # 28 "../Generated/inc\\Spi_Drv_Cfg.h" # 1 "../Generated/inc/Spi_Drv_PBcfg.h" 1 # 29 "../Generated/inc\\Spi_Drv_Cfg.h" 2 # 31 "../../../mcal/Spi_ZX_K14xM/Inc/Spi_Drv_Types.h" 2 # 84 "../../../mcal/Spi_ZX_K14xM/Inc/Spi_Drv_Types.h" typedef enum { SPI_DRV_EVENT_SUCCESS = 0U, SPI_DRV_EVENT_FAULT } Spi_Drv_EventType; typedef void (*Spi_Drv_CallbackType)(uint8 Instance, Spi_Drv_EventType Event); typedef enum { SPI_DRV_POLLING = 0U, SPI_DRV_INTERRUPT } Spi_Drv_AsyncModeType; typedef enum { SPI_DRV_UNINIT = 0U, SPI_DRV_IDLE, SPI_DRV_BUSY, SPI_DRV_FAULT } Spi_Drv_StatusType; typedef struct { uint8 FrameSize; boolean Lsb; uint32 DefaultData; } Spi_Drv_DeviceParamType; typedef struct { uint8 Instance; uint8 CsIdentifier; uint8 ClockPhase; uint8 ClockPolarity; uint32 ClockDivider; Spi_Drv_DeviceParamType *DeviceParamPtr; } Spi_Drv_ExternalDeviceType; typedef struct { uint8 Instance; boolean DmaUsed; uint8 TxDmaChannel; uint8 RxDmaChannel; Spi_Drv_AsyncModeType AsyncMode; } Spi_Drv_PhyUnitConfigType; typedef struct { Spi_Drv_AsyncModeType AsyncMode; Spi_Drv_StatusType Status; uint8 *RxBuffer; uint8 *TxBuffer; Spi_Drv_CallbackType Callback; uint16 RxIndex; uint16 TxIndex; uint16 ExpectReadNum; uint16 ExpectWriteNum; boolean ContinueTransferFlag; boolean FirstTransferFlag; const Spi_Drv_PhyUnitConfigType *PhyUnitConfig; const Spi_Drv_ExternalDeviceType *ExternalDevice; uint8 FrameSize; boolean TxLsb; boolean NextTransferConfigAvailable; uint8 CurrentTxFifoSlot; boolean TxDoneFlag; } Spi_Drv_TransferConfigType; # 30 "../../../mcal/Spi_ZX_K14xM/Inc/Spi_Drvw_Types.h" 2 # 88 "../../../mcal/Spi_ZX_K14xM/Inc/Spi_Drvw_Types.h" typedef enum { IB = 0, EB } Spi_Drvw_BufferType; typedef enum { SPI_DRVW_POLLING_MODE = 0, SPI_DRVW_INTERRUPT_MODE } Spi_Drvw_AsyncModeType; typedef uint8 Spi_Drvw_HWUnitType; typedef uint16 Spi_Drvw_NumberOfDataType; typedef uint8 Spi_Drvw_DataBufferType; typedef struct { uint8 Instance; uint32 IsSync; uint32 SpiCoreUse; const Spi_Drv_PhyUnitConfigType *PhyUnitConfigPtr; } Spi_Drvw_HWUnitConfigType; typedef struct { const Spi_Drvw_HWUnitConfigType *DrvwHWUnitConfig; } Spi_Drvw_HWUnitConfigListType; typedef struct { uint8 Instance; uint32 SpiCoreUse; const Spi_Drv_ExternalDeviceType *DrvExternalDeviceConfigPtr; } Spi_Drvw_ExternalDeviceConfigType; typedef struct { const Spi_Drvw_ExternalDeviceConfigType *DrvwExternalDeviceConfigPtr; } Spi_Drvw_ExternalDeviceListType; typedef struct { Spi_Drvw_DataBufferType *TxBuffer; Spi_Drvw_DataBufferType *RxBuffer; } Spi_Drvw_BufferDescriptorType; typedef struct { uint8 Flags; Spi_Drvw_NumberOfDataType Length; } Spi_Drvw_ChannelStateType; typedef struct { Spi_Drvw_BufferType BufferType; uint8 FrameSize; boolean Lsb; uint32 DefaultTransmitValue; Spi_Drvw_NumberOfDataType Length; Spi_Drvw_BufferDescriptorType *BufferDescriptor; uint32 SpiCoreUse; Spi_Drvw_ChannelStateType *ChannelState; } Spi_Drvw_ChannelConfigType; # 30 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drvw.h" 2 # 92 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drvw.h" # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" 1 # 876 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" #pragma clang section rodata = ".mcal_config_data" # 93 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drvw.h" 2 extern const Spi_Drvw_ExternalDeviceListType Spi_ExternalDeviceConfigList[4U]; extern const Spi_Drvw_HWUnitConfigListType Spi_HwUnitConfigList[(2U)]; # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" 1 # 892 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" #pragma clang section rodata = "" # 100 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drvw.h" 2 # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" 1 # 1072 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" #pragma clang section text = ".mcal_code" # 107 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drvw.h" 2 # 117 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drvw.h" void Spi_Drvw_Init(const Spi_Drvw_HWUnitType HWUnit, const Spi_Drvw_HWUnitConfigType *HWUnitCfgPtr); # 127 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drvw.h" void Spi_Drvw_DeInit(Spi_Drvw_HWUnitType HWUnit); # 143 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drvw.h" Std_ReturnType Spi_Drvw_TransmitChannel(const Spi_Drvw_ChannelConfigType *ChannelCfgPtr, const Spi_Drvw_ExternalDeviceConfigType *ExternalDeviceCfgPtr, const boolean IsFirstChannel, const boolean IsLastChannel, const boolean IsSync); # 158 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drvw.h" void Spi_Drvw_PollAsyncTransmit(Spi_Drvw_HWUnitType HWUnit); # 169 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drvw.h" void Spi_Drvw_SetAsyncMode(Spi_Drvw_HWUnitType HWUnit, Spi_Drvw_AsyncModeType Mode); # 186 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drvw.h" # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" 1 # 1088 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" #pragma clang section text = "" # 187 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drvw.h" 2 # 27 "../../../mcal/Spi_ZX_K14xM/Src/Spi_Drvw.c" 2 # 1 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drv.h" 1 # 71 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drv.h" # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" 1 # 1436 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" #pragma clang section bss = ".mcal_bss" # 72 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drv.h" 2 extern Spi_Drv_DeviceParamType Spi_Drv_DeviceParamArray[(4U)]; # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" 1 # 1452 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" #pragma clang section bss = "" # 77 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drv.h" 2 # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" 1 # 876 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" #pragma clang section rodata = ".mcal_config_data" # 80 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drv.h" 2 extern const Spi_Drv_ExternalDeviceType Spi_Drv_ExternalDeviceConfig_SpiExDev_Stp; extern const Spi_Drv_ExternalDeviceType Spi_Drv_ExternalDeviceConfig_SpiExDev_Sbc; extern const Spi_Drv_ExternalDeviceType Spi_Drv_ExternalDeviceConfig_SpiExDev_Buck; extern const Spi_Drv_ExternalDeviceType Spi_Drv_ExternalDeviceConfig_SpiExDev_Boost; extern const Spi_Drv_PhyUnitConfigType Spi_Drv_PhyUnitConfig_SpiPhy0; extern const Spi_Drv_PhyUnitConfigType Spi_Drv_PhyUnitConfig_SpiPhy1; # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" 1 # 892 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" #pragma clang section rodata = "" # 87 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drv.h" 2 # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" 1 # 1072 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" #pragma clang section text = ".mcal_code" # 96 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drv.h" 2 # 106 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drv.h" Std_ReturnType Spi_Drv_Init(const Spi_Drv_PhyUnitConfigType *PhyUnitConfigPtr); # 118 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drv.h" Std_ReturnType Spi_Drv_DeInit(uint8 Instance); # 132 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drv.h" Std_ReturnType Spi_Drv_SetDeviceParams(const Spi_Drv_ExternalDeviceType *DevicePtr, uint8 FrameSize, boolean Lsb, uint32 DefaultData); # 148 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drv.h" Std_ReturnType Spi_Drv_SyncTransmit(const Spi_Drv_ExternalDeviceType *ExternalDevice, uint8 *TxBuffer, uint8 *RxBuffer, uint16 Length, uint32 TimeOut); # 165 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drv.h" Std_ReturnType Spi_Drv_AsyncTransmit(const Spi_Drv_ExternalDeviceType *ExternalDevice, uint8 *TxBuffer, uint8 *RxBuffer, uint16 Length, Spi_Drv_CallbackType EndCallback); # 176 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drv.h" void Spi_Drv_PollAsyncTransmit(uint8 Instance); # 188 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drv.h" Std_ReturnType Spi_Drv_SetAsyncMode(uint8 Instance, Spi_Drv_AsyncModeType Mode); # 197 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drv.h" void Spi_Drv_Cancel(uint8 Instance); # 210 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drv.h" Spi_Drv_StatusType Spi_Drv_GetStatus(uint8 Instance); # 219 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drv.h" void Spi_Drv_IntHandler(uint8 Instance); # 228 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drv.h" void Spi_Drv_DmaTxIntHandler(uint8 Instance); void Spi_Drv_DmaRxIntHandler(uint8 Instance); # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" 1 # 1088 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" #pragma clang section text = "" # 241 "../../../mcal/Spi_ZX_K14xM/Inc\\Spi_Drv.h" 2 # 28 "../../../mcal/Spi_ZX_K14xM/Src/Spi_Drvw.c" 2 # 91 "../../../mcal/Spi_ZX_K14xM/Src/Spi_Drvw.c" # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" 1 # 1324 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" #pragma clang section bss = ".mcal_bss" # 92 "../../../mcal/Spi_ZX_K14xM/Src/Spi_Drvw.c" 2 static Spi_Drvw_HWUnitType Spi_Drvw_PhyUnitToHWUnitMapping[(4U)]; static uint8 Spi_Drvw_HWUnitToPhyUnitMapping[(2U)]; # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" 1 # 1340 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" #pragma clang section bss = "" # 100 "../../../mcal/Spi_ZX_K14xM/Src/Spi_Drvw.c" 2 # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" 1 # 1408 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" #pragma clang section bss = ".mcal_bss" # 107 "../../../mcal/Spi_ZX_K14xM/Src/Spi_Drvw.c" 2 extern Spi_Drv_TransferConfigType *Spi_Drv_TransferConfigPtrArray[(4U)]; # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" 1 # 1424 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" #pragma clang section bss = "" # 112 "../../../mcal/Spi_ZX_K14xM/Src/Spi_Drvw.c" 2 # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" 1 # 1072 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" #pragma clang section text = ".mcal_code" # 119 "../../../mcal/Spi_ZX_K14xM/Src/Spi_Drvw.c" 2 extern void Spi_ChannelEndCallback(Spi_Drvw_HWUnitType HwUnit, boolean JobResultOK); # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" 1 # 1088 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" #pragma clang section text = "" # 126 "../../../mcal/Spi_ZX_K14xM/Src/Spi_Drvw.c" 2 # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" 1 # 1072 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" #pragma clang section text = ".mcal_code" # 133 "../../../mcal/Spi_ZX_K14xM/Src/Spi_Drvw.c" 2 static void Spi_Drvw_ChannelEndCallback(uint8 Instance, Spi_Drv_EventType Event); # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" 1 # 1088 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" #pragma clang section text = "" # 140 "../../../mcal/Spi_ZX_K14xM/Src/Spi_Drvw.c" 2 # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" 1 # 1072 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" #pragma clang section text = ".mcal_code" # 147 "../../../mcal/Spi_ZX_K14xM/Src/Spi_Drvw.c" 2 # 157 "../../../mcal/Spi_ZX_K14xM/Src/Spi_Drvw.c" static void Spi_Drvw_ChannelEndCallback(uint8 Instance, Spi_Drv_EventType Event) { Spi_Drvw_HWUnitType HwUnit = Spi_Drvw_PhyUnitToHWUnitMapping[Instance]; boolean JobResultOk; if (SPI_DRV_EVENT_FAULT != Event) { JobResultOk = (boolean)1U; } else { JobResultOk = (boolean)0U; } (void)Spi_ChannelEndCallback(HwUnit, JobResultOk); } # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" 1 # 1088 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" #pragma clang section text = "" # 176 "../../../mcal/Spi_ZX_K14xM/Src/Spi_Drvw.c" 2 # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" 1 # 1072 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" #pragma clang section text = ".mcal_code" # 183 "../../../mcal/Spi_ZX_K14xM/Src/Spi_Drvw.c" 2 void Spi_Drvw_Init(const Spi_Drvw_HWUnitType HWUnit, const Spi_Drvw_HWUnitConfigType *HWUnitCfgPtr) { while (1U) {; if ((boolean)(((void *)0) != HWUnitCfgPtr) == (boolean)0U) { McalLib_Assert((uint8 *)"../../../mcal/Spi_ZX_K14xM/Src/Spi_Drvw.c", 198); break; }; Spi_Drvw_PhyUnitToHWUnitMapping[HWUnitCfgPtr->Instance] = HWUnit; Spi_Drvw_HWUnitToPhyUnitMapping[HWUnit] = HWUnitCfgPtr->Instance; (void)Spi_Drv_Init(HWUnitCfgPtr->PhyUnitConfigPtr); break; }; } # 217 "../../../mcal/Spi_ZX_K14xM/Src/Spi_Drvw.c" void Spi_Drvw_DeInit(Spi_Drvw_HWUnitType HWUnit) { uint8 Instance = Spi_Drvw_HWUnitToPhyUnitMapping[HWUnit]; (void)Spi_Drv_DeInit(Instance); } # 238 "../../../mcal/Spi_ZX_K14xM/Src/Spi_Drvw.c" Std_ReturnType Spi_Drvw_TransmitChannel(const Spi_Drvw_ChannelConfigType *ChannelCfgPtr, const Spi_Drvw_ExternalDeviceConfigType *ExternalDeviceCfgPtr, const boolean IsFirstChannel, const boolean IsLastChannel, const boolean IsSync) { uint8 Instance; Spi_Drvw_DataBufferType *RxBuffer; Spi_Drvw_DataBufferType *TxBuffer; Spi_Drvw_NumberOfDataType DataNum; const Spi_Drv_ExternalDeviceType *DrvExternalDevicePtr; Std_ReturnType Ret = (Std_ReturnType)0x00U; while (1U) {; if ((boolean)(((void *)0) != ChannelCfgPtr) == (boolean)0U) { McalLib_Assert((uint8 *)"../../../mcal/Spi_ZX_K14xM/Src/Spi_Drvw.c", 256); break; }; if ((boolean)(((void *)0) != ExternalDeviceCfgPtr) == (boolean)0U) { McalLib_Assert((uint8 *)"../../../mcal/Spi_ZX_K14xM/Src/Spi_Drvw.c", 257); break; }; Instance = ExternalDeviceCfgPtr->Instance; if ((boolean)(((void *)0) != Spi_Drv_TransferConfigPtrArray[Instance]) == (boolean)0U) { McalLib_Assert((uint8 *)"../../../mcal/Spi_ZX_K14xM/Src/Spi_Drvw.c", 263); break; }; Spi_Drv_TransferConfigPtrArray[Instance]->FirstTransferFlag = (boolean)IsFirstChannel; if (1U == IsLastChannel) { Spi_Drv_TransferConfigPtrArray[Instance]->ContinueTransferFlag = (boolean)0U; } else { Spi_Drv_TransferConfigPtrArray[Instance]->ContinueTransferFlag = (boolean)1U; } DrvExternalDevicePtr = ExternalDeviceCfgPtr->DrvExternalDeviceConfigPtr; Ret = Spi_Drv_SetDeviceParams(DrvExternalDevicePtr, ChannelCfgPtr->FrameSize, ChannelCfgPtr->Lsb, ChannelCfgPtr->DefaultTransmitValue); if (0x01U != Ret) { if ((boolean)(((void *)0) != ChannelCfgPtr->ChannelState) == (boolean)0U) { McalLib_Assert((uint8 *)"../../../mcal/Spi_ZX_K14xM/Src/Spi_Drvw.c", 283); break; }; if ((boolean)(((void *)0) != ChannelCfgPtr->BufferDescriptor) == (boolean)0U) { McalLib_Assert((uint8 *)"../../../mcal/Spi_ZX_K14xM/Src/Spi_Drvw.c", 284); break; }; DataNum = ChannelCfgPtr->ChannelState->Length; RxBuffer = ChannelCfgPtr->BufferDescriptor->RxBuffer; if (0u != (ChannelCfgPtr->ChannelState->Flags & ((uint8)0x01U))) { TxBuffer = ((void *)0); } else { TxBuffer = ChannelCfgPtr->BufferDescriptor->TxBuffer; } if (1U == IsSync) { Ret = Spi_Drv_SyncTransmit(DrvExternalDevicePtr, TxBuffer, RxBuffer, DataNum, ((uint32)(50000))); } else { (void)Spi_Drv_AsyncTransmit(DrvExternalDevicePtr, TxBuffer, RxBuffer, DataNum, &Spi_Drvw_ChannelEndCallback); } } break; }; return Ret; } # 326 "../../../mcal/Spi_ZX_K14xM/Src/Spi_Drvw.c" void Spi_Drvw_PollAsyncTransmit(Spi_Drvw_HWUnitType HWUnit) { uint8 Instance = Spi_Drvw_HWUnitToPhyUnitMapping[HWUnit]; while (1U) {; if ((boolean)(((void *)0) != Spi_Drv_TransferConfigPtrArray[Instance]) == (boolean)0U) { McalLib_Assert((uint8 *)"../../../mcal/Spi_ZX_K14xM/Src/Spi_Drvw.c", 335); break; }; if (SPI_DRV_POLLING == Spi_Drv_TransferConfigPtrArray[Instance]->AsyncMode) { Spi_Drv_PollAsyncTransmit(Instance); } break; }; } # 357 "../../../mcal/Spi_ZX_K14xM/Src/Spi_Drvw.c" void Spi_Drvw_SetAsyncMode(Spi_Drvw_HWUnitType HWUnit, Spi_Drvw_AsyncModeType Mode) { uint8 Instance = Spi_Drvw_HWUnitToPhyUnitMapping[HWUnit]; if (SPI_DRVW_POLLING_MODE == Mode) { (void)Spi_Drv_SetAsyncMode(Instance, SPI_DRV_POLLING); } else if (SPI_DRVW_INTERRUPT_MODE == Mode) { (void)Spi_Drv_SetAsyncMode(Instance, SPI_DRV_INTERRUPT); } else { } } # 393 "../../../mcal/Spi_ZX_K14xM/Src/Spi_Drvw.c" # 1 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" 1 # 1088 "../../../mcal/Base_ZX_K14xM/Inc/MemMap\\Spi_MemMap.h" #pragma clang section text = "" # 394 "../../../mcal/Spi_ZX_K14xM/Src/Spi_Drvw.c" 2