Uart_Ipw_LpuartCallback (const uint8 HwInstance, const Lpuart_Uart_Ip_EventType Event, void * UserData) { Uart_EventType ConvertEvent; uint8 Channel; int _1; signed char _2; int _3; const struct Uart_Ipw_HwConfigType * _4; void (*) (uint8, Uart_EventType) _5; int _6; const struct Uart_Ipw_HwConfigType * _7; void (*) (uint8, Uart_EventType) _8; : _1 = (int) HwInstance_10(D); _2 = Uart_Ipw_s8HwMapping[_1]; Channel_12 = (uint8) _2; ConvertEvent_15 = Uart_Ipw_LpuartConvertEventType (Event_13(D)); _3 = (int) Channel_12; _4 = Uart_Ipw_apChnConfig[_3]; _5 = _4->Callback; if (_5 != 0B) goto ; [INV] else goto ; [INV] : _6 = (int) Channel_12; _7 = Uart_Ipw_apChnConfig[_6]; _8 = _7->Callback; _8 (Channel_12, ConvertEvent_15); : return; } Uart_Ipw_LpuartConvertEventType (Lpuart_Uart_Ip_EventType Event) { Uart_EventType TempEvent; Uart_EventType D.6354; Uart_EventType _9; : TempEvent_2 = 3; switch (Event_3(D)) [INV], case 0: [INV], case 1: [INV], case 2: [INV], case 3: [INV], case 4: [INV]> : : TempEvent_8 = 0; goto ; [INV] : : TempEvent_7 = 1; goto ; [INV] : : TempEvent_6 = 2; goto ; [INV] : : TempEvent_5 = 3; goto ; [INV] : : TempEvent_4 = 4; goto ; [INV] : : : # TempEvent_1 = PHI _9 = TempEvent_1; : : return _9; } Uart_Ipw_LpuartConvertBaudrateType (Uart_BaudrateType Baudrate) { Lpuart_Uart_Ip_BaudrateType TempBaud; Lpuart_Uart_Ip_BaudrateType D.6352; Lpuart_Uart_Ip_BaudrateType _18; : TempBaud_2 = 1200; switch (Baudrate_3(D)) [INV], case 1200: [INV], case 2400: [INV], case 4800: [INV], case 9600: [INV], case 14400: [INV], case 19200: [INV], case 28800: [INV], case 38400: [INV], case 57600: [INV], case 115200: [INV], case 230400: [INV], case 460800: [INV], case 921600: [INV], case 1843200: [INV]> : : TempBaud_17 = 1200; goto ; [INV] : : TempBaud_16 = 2400; goto ; [INV] : : TempBaud_15 = 4800; goto ; [INV] : : TempBaud_14 = 9600; goto ; [INV] : : TempBaud_13 = 14400; goto ; [INV] : : TempBaud_12 = 19200; goto ; [INV] : : TempBaud_11 = 28800; goto ; [INV] : : TempBaud_10 = 38400; goto ; [INV] : : TempBaud_9 = 57600; goto ; [INV] : : TempBaud_8 = 115200; goto ; [INV] : : TempBaud_7 = 230400; goto ; [INV] : : TempBaud_6 = 460800; goto ; [INV] : : TempBaud_5 = 921600; goto ; [INV] : : TempBaud_4 = 1843200; goto ; [INV] : : : # TempBaud_1 = PHI _18 = TempBaud_1; : : return _18; } Uart_Ipw_LpuartConvertStatus (Lpuart_Uart_Ip_StatusType Status) { Uart_StatusType TempStatus; Uart_StatusType D.6350; Uart_StatusType _13; : TempStatus_2 = 6; switch (Status_3(D)) [INV], case 0: [INV], case 2: [INV], case 3: [INV], case 5: [INV], case 6: [INV], case 7: [INV], case 8: [INV], case 9: [INV]> : : TempStatus_11 = 0; goto ; [INV] : : TempStatus_10 = 1; goto ; [INV] : : TempStatus_7 = 2; goto ; [INV] : : TempStatus_9 = 6; goto ; [INV] : : TempStatus_6 = 3; goto ; [INV] : : TempStatus_8 = 4; goto ; [INV] : : TempStatus_4 = 7; goto ; [INV] : : TempStatus_5 = 5; goto ; [INV] : : TempStatus_12 = 8; : # TempStatus_1 = PHI _13 = TempStatus_1; : : return _13; } Uart_Ipw_GetReceiveStatus (uint8 Channel, uint32 * BytesRemaining) { Lpuart_Uart_Ip_StatusType u32LpuartIpStatus; uint8 HwUnit; Uart_StatusType TempStatus; Uart_StatusType D.6348; int _1; const struct Uart_Ipw_HwConfigType * _2; int _3; const struct Uart_Ipw_HwConfigType * _4; _5; Uart_StatusType _17; : TempStatus_8 = 6; _1 = (int) Channel_9(D); _2 = Uart_Ipw_apChnConfig[_1]; HwUnit_11 = _2->UartHwChannel; _3 = (int) Channel_9(D); _4 = Uart_Ipw_apChnConfig[_3]; _5 = _4->UartIpType; if (_5 == 0) goto ; [INV] else goto ; [INV] : u32LpuartIpStatus_14 = Lpuart_Uart_Ip_GetReceiveStatus (HwUnit_11, BytesRemaining_12(D)); TempStatus_16 = Uart_Ipw_LpuartConvertStatus (u32LpuartIpStatus_14); : # TempStatus_6 = PHI _17 = TempStatus_6; : : return _17; } Uart_Ipw_GetTransmitStatus (uint8 Channel, uint32 * BytesRemaining) { Lpuart_Uart_Ip_StatusType u32LpuartIpStatus; uint8 HwUnit; Uart_StatusType TempStatus; Uart_StatusType D.6344; int _1; const struct Uart_Ipw_HwConfigType * _2; int _3; const struct Uart_Ipw_HwConfigType * _4; _5; Uart_StatusType _17; : TempStatus_8 = 6; _1 = (int) Channel_9(D); _2 = Uart_Ipw_apChnConfig[_1]; HwUnit_11 = _2->UartHwChannel; _3 = (int) Channel_9(D); _4 = Uart_Ipw_apChnConfig[_3]; _5 = _4->UartIpType; if (_5 == 0) goto ; [INV] else goto ; [INV] : u32LpuartIpStatus_14 = Lpuart_Uart_Ip_GetTransmitStatus (HwUnit_11, BytesRemaining_12(D)); TempStatus_16 = Uart_Ipw_LpuartConvertStatus (u32LpuartIpStatus_14); : # TempStatus_6 = PHI _17 = TempStatus_6; : : return _17; } Uart_Ipw_AsyncSend (uint8 Channel, const uint8 * Buffer, uint32 BufferSize) { uint8 HwUnit; Std_ReturnType TempStatus; Std_ReturnType D.6340; int _1; const struct Uart_Ipw_HwConfigType * _2; int _3; const struct Uart_Ipw_HwConfigType * _4; _5; _6; Std_ReturnType _17; : TempStatus_9 = 1; _1 = (int) Channel_10(D); _2 = Uart_Ipw_apChnConfig[_1]; HwUnit_12 = _2->UartHwChannel; _3 = (int) Channel_10(D); _4 = Uart_Ipw_apChnConfig[_3]; _5 = _4->UartIpType; if (_5 == 0) goto ; [INV] else goto ; [INV] : _6 = Lpuart_Uart_Ip_AsyncSend (HwUnit_12, Buffer_13(D), BufferSize_14(D)); if (_6 == 0) goto ; [INV] else goto ; [INV] : TempStatus_16 = 0; : # TempStatus_7 = PHI _17 = TempStatus_7; : : return _17; } Uart_Ipw_AsyncReceive (uint8 Channel, uint8 * Buffer, uint32 BufferSize) { uint8 HwUnit; Std_ReturnType TempStatus; Std_ReturnType D.6334; int _1; const struct Uart_Ipw_HwConfigType * _2; int _3; const struct Uart_Ipw_HwConfigType * _4; _5; _6; Std_ReturnType _17; : TempStatus_9 = 1; _1 = (int) Channel_10(D); _2 = Uart_Ipw_apChnConfig[_1]; HwUnit_12 = _2->UartHwChannel; _3 = (int) Channel_10(D); _4 = Uart_Ipw_apChnConfig[_3]; _5 = _4->UartIpType; if (_5 == 0) goto ; [INV] else goto ; [INV] : _6 = Lpuart_Uart_Ip_AsyncReceive (HwUnit_12, Buffer_13(D), BufferSize_14(D)); if (_6 == 0) goto ; [INV] else goto ; [INV] : TempStatus_16 = 0; : # TempStatus_7 = PHI _17 = TempStatus_7; : : return _17; } Uart_Ipw_SyncReceive (uint8 Channel, uint8 * Buffer, uint32 BufferSize, uint32 Timeout) { Lpuart_Uart_Ip_StatusType u32LpuartIpStatus; uint8 HwUnit; Std_ReturnType TempStatus; Std_ReturnType D.6328; int _1; const struct Uart_Ipw_HwConfigType * _2; int _3; const struct Uart_Ipw_HwConfigType * _4; _5; Std_ReturnType _20; : TempStatus_8 = 1; _1 = (int) Channel_9(D); _2 = Uart_Ipw_apChnConfig[_1]; HwUnit_11 = _2->UartHwChannel; _3 = (int) Channel_9(D); _4 = Uart_Ipw_apChnConfig[_3]; _5 = _4->UartIpType; if (_5 == 0) goto ; [INV] else goto ; [INV] : u32LpuartIpStatus_16 = Lpuart_Uart_Ip_SyncReceive (HwUnit_11, Buffer_12(D), BufferSize_13(D), Timeout_14(D)); if (u32LpuartIpStatus_16 == 0) goto ; [INV] else goto ; [INV] : TempStatus_19 = 0; goto ; [INV] : if (u32LpuartIpStatus_16 == 3) goto ; [INV] else goto ; [INV] : TempStatus_18 = 6; goto ; [INV] : TempStatus_17 = 1; : # TempStatus_6 = PHI _20 = TempStatus_6; : : return _20; } Uart_Ipw_SyncSend (uint8 Channel, const uint8 * Buffer, uint32 BufferSize, uint32 Timeout) { Lpuart_Uart_Ip_StatusType u32LpuartIpStatus; uint8 HwUnit; Std_ReturnType TempStatus; Std_ReturnType D.6318; int _1; const struct Uart_Ipw_HwConfigType * _2; int _3; const struct Uart_Ipw_HwConfigType * _4; _5; Std_ReturnType _20; : TempStatus_8 = 1; _1 = (int) Channel_9(D); _2 = Uart_Ipw_apChnConfig[_1]; HwUnit_11 = _2->UartHwChannel; _3 = (int) Channel_9(D); _4 = Uart_Ipw_apChnConfig[_3]; _5 = _4->UartIpType; if (_5 == 0) goto ; [INV] else goto ; [INV] : u32LpuartIpStatus_16 = Lpuart_Uart_Ip_SyncSend (HwUnit_11, Buffer_12(D), BufferSize_13(D), Timeout_14(D)); if (u32LpuartIpStatus_16 == 0) goto ; [INV] else goto ; [INV] : TempStatus_19 = 0; goto ; [INV] : if (u32LpuartIpStatus_16 == 3) goto ; [INV] else goto ; [INV] : TempStatus_18 = 6; goto ; [INV] : TempStatus_17 = 1; : # TempStatus_6 = PHI _20 = TempStatus_6; : : return _20; } Uart_Ipw_SetRxBuffer (uint8 Channel, uint8 * Buffer, uint32 BufferSize) { uint8 HwUnit; int _1; const struct Uart_Ipw_HwConfigType * _2; int _3; const struct Uart_Ipw_HwConfigType * _4; _5; : _1 = (int) Channel_7(D); _2 = Uart_Ipw_apChnConfig[_1]; HwUnit_9 = _2->UartHwChannel; _3 = (int) Channel_7(D); _4 = Uart_Ipw_apChnConfig[_3]; _5 = _4->UartIpType; if (_5 == 0) goto ; [INV] else goto ; [INV] : Lpuart_Uart_Ip_SetRxBuffer (HwUnit_9, Buffer_10(D), BufferSize_11(D)); : return; } Uart_Ipw_SetTxBuffer (uint8 Channel, const uint8 * Buffer, uint32 BufferSize) { uint8 HwUnit; int _1; const struct Uart_Ipw_HwConfigType * _2; int _3; const struct Uart_Ipw_HwConfigType * _4; _5; : _1 = (int) Channel_7(D); _2 = Uart_Ipw_apChnConfig[_1]; HwUnit_9 = _2->UartHwChannel; _3 = (int) Channel_7(D); _4 = Uart_Ipw_apChnConfig[_3]; _5 = _4->UartIpType; if (_5 == 0) goto ; [INV] else goto ; [INV] : Lpuart_Uart_Ip_SetTxBuffer (HwUnit_9, Buffer_10(D), BufferSize_11(D)); : return; } Uart_Ipw_AbortReceivingData (uint8 Channel) { uint8 HwUnit; Std_ReturnType TempStatus; Std_ReturnType D.6304; int _1; const struct Uart_Ipw_HwConfigType * _2; int _3; const struct Uart_Ipw_HwConfigType * _4; _5; _6; Std_ReturnType _15; : TempStatus_9 = 1; _1 = (int) Channel_10(D); _2 = Uart_Ipw_apChnConfig[_1]; HwUnit_12 = _2->UartHwChannel; _3 = (int) Channel_10(D); _4 = Uart_Ipw_apChnConfig[_3]; _5 = _4->UartIpType; if (_5 == 0) goto ; [INV] else goto ; [INV] : _6 = Lpuart_Uart_Ip_AbortReceivingData (HwUnit_12); if (_6 == 0) goto ; [INV] else goto ; [INV] : TempStatus_14 = 0; : # TempStatus_7 = PHI _15 = TempStatus_7; : : return _15; } Uart_Ipw_AbortSendingData (uint8 Channel) { uint8 HwUnit; Std_ReturnType TempStatus; Std_ReturnType D.6298; int _1; const struct Uart_Ipw_HwConfigType * _2; int _3; const struct Uart_Ipw_HwConfigType * _4; _5; _6; Std_ReturnType _15; : TempStatus_9 = 1; _1 = (int) Channel_10(D); _2 = Uart_Ipw_apChnConfig[_1]; HwUnit_12 = _2->UartHwChannel; _3 = (int) Channel_10(D); _4 = Uart_Ipw_apChnConfig[_3]; _5 = _4->UartIpType; if (_5 == 0) goto ; [INV] else goto ; [INV] : _6 = Lpuart_Uart_Ip_AbortSendingData (HwUnit_12); if (_6 == 0) goto ; [INV] else goto ; [INV] : TempStatus_14 = 0; : # TempStatus_7 = PHI _15 = TempStatus_7; : : return _15; } Uart_Ipw_GetBaudrate (uint8 Channel, uint32 * BaudrateValue) { uint8 HwUnit; int _1; const struct Uart_Ipw_HwConfigType * _2; int _3; const struct Uart_Ipw_HwConfigType * _4; _5; : _1 = (int) Channel_7(D); _2 = Uart_Ipw_apChnConfig[_1]; HwUnit_9 = _2->UartHwChannel; _3 = (int) Channel_7(D); _4 = Uart_Ipw_apChnConfig[_3]; _5 = _4->UartIpType; if (_5 == 0) goto ; [INV] else goto ; [INV] : Lpuart_Uart_Ip_GetBaudRate (HwUnit_9, BaudrateValue_10(D)); : return; } Uart_Ipw_SetBaudrate (uint8 Channel, Uart_BaudrateType BaudRateValue, uint32 ClockFrequency) { Lpuart_Uart_Ip_BaudrateType LpuartBaud; uint8 HwUnit; Std_ReturnType TempStatus; Std_ReturnType D.6290; int _1; const struct Uart_Ipw_HwConfigType * _2; int _3; const struct Uart_Ipw_HwConfigType * _4; _5; _6; Std_ReturnType _19; : TempStatus_9 = 1; _1 = (int) Channel_10(D); _2 = Uart_Ipw_apChnConfig[_1]; HwUnit_12 = _2->UartHwChannel; LpuartBaud_15 = Uart_Ipw_LpuartConvertBaudrateType (BaudRateValue_13(D)); _3 = (int) Channel_10(D); _4 = Uart_Ipw_apChnConfig[_3]; _5 = _4->UartIpType; if (_5 == 0) goto ; [INV] else goto ; [INV] : _6 = Lpuart_Uart_Ip_SetBaudRate (HwUnit_12, LpuartBaud_15, ClockFrequency_16(D)); if (_6 == 0) goto ; [INV] else goto ; [INV] : TempStatus_18 = 0; : # TempStatus_7 = PHI _19 = TempStatus_7; : : return _19; } Uart_Ipw_Deinit (uint8 Channel) { uint8 HwUnit; int _1; const struct Uart_Ipw_HwConfigType * _2; int _3; const struct Uart_Ipw_HwConfigType * _4; _5; int _6; int _7; : _1 = (int) Channel_9(D); _2 = Uart_Ipw_apChnConfig[_1]; HwUnit_11 = _2->UartHwChannel; _3 = (int) Channel_9(D); _4 = Uart_Ipw_apChnConfig[_3]; _5 = _4->UartIpType; if (_5 == 0) goto ; [INV] else goto ; [INV] : _6 = (int) HwUnit_11; Uart_Ipw_s8HwMapping[_6] = -1; Lpuart_Uart_Ip_Deinit (HwUnit_11); : _7 = (int) Channel_9(D); Uart_Ipw_apChnConfig[_7] = 0B; return; } Uart_Ipw_Init (uint8 Channel, const struct Uart_Ipw_HwConfigType * Config) { uint8 HwUnit; int _1; int _2; const struct Uart_Ipw_HwConfigType * _3; _4; int _5; signed char Channel.0_6; const struct Uart_Ipw_IpConfigType * _7; const struct Lpuart_Uart_Ip_UserConfigType * _8; : HwUnit_12 = Config_11(D)->UartHwChannel; _1 = (int) Channel_13(D); Uart_Ipw_apChnConfig[_1] = Config_11(D); _2 = (int) Channel_13(D); _3 = Uart_Ipw_apChnConfig[_2]; _4 = _3->UartIpType; if (_4 == 0) goto ; [INV] else goto ; [INV] : _5 = (int) HwUnit_12; Channel.0_6 = (signed char) Channel_13(D); Uart_Ipw_s8HwMapping[_5] = Channel.0_6; _7 = Config_11(D)->UserConfig; _8 = _7->LpuartUserConfig; Lpuart_Uart_Ip_Init (HwUnit_12, _8); : return; }