123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851 |
- 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 (*<T53e>) (uint8, Uart_EventType) _5;
- int _6;
- const struct Uart_Ipw_HwConfigType * _7;
- void (*<T53e>) (uint8, Uart_EventType) _8;
- <bb 2> :
- _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 <bb 3>; [INV]
- else
- goto <bb 4>; [INV]
- <bb 3> :
- _6 = (int) Channel_12;
- _7 = Uart_Ipw_apChnConfig[_6];
- _8 = _7->Callback;
- _8 (Channel_12, ConvertEvent_15);
- <bb 4> :
- return;
- }
- Uart_Ipw_LpuartConvertEventType (Lpuart_Uart_Ip_EventType Event)
- {
- Uart_EventType TempEvent;
- Uart_EventType D.6354;
- Uart_EventType _9;
- <bb 2> :
- TempEvent_2 = 3;
- switch (Event_3(D)) <default: <L5> [INV], case 0: <L0> [INV], case 1: <L1> [INV], case 2: <L2> [INV], case 3: <L3> [INV], case 4: <L4> [INV]>
- <bb 3> :
- <L0>:
- TempEvent_8 = 0;
- goto <bb 9>; [INV]
- <bb 4> :
- <L1>:
- TempEvent_7 = 1;
- goto <bb 9>; [INV]
- <bb 5> :
- <L2>:
- TempEvent_6 = 2;
- goto <bb 9>; [INV]
- <bb 6> :
- <L3>:
- TempEvent_5 = 3;
- goto <bb 9>; [INV]
- <bb 7> :
- <L4>:
- TempEvent_4 = 4;
- goto <bb 9>; [INV]
- <bb 8> :
- <L5>:
- <bb 9> :
- # TempEvent_1 = PHI <TempEvent_8(3), TempEvent_7(4), TempEvent_6(5), TempEvent_5(6), TempEvent_4(7), TempEvent_2(8)>
- _9 = TempEvent_1;
- <bb 10> :
- <L7>:
- return _9;
- }
- Uart_Ipw_LpuartConvertBaudrateType (Uart_BaudrateType Baudrate)
- {
- Lpuart_Uart_Ip_BaudrateType TempBaud;
- Lpuart_Uart_Ip_BaudrateType D.6352;
- Lpuart_Uart_Ip_BaudrateType _18;
- <bb 2> :
- TempBaud_2 = 1200;
- switch (Baudrate_3(D)) <default: <L14> [INV], case 1200: <L0> [INV], case 2400: <L1> [INV], case 4800: <L2> [INV], case 9600: <L3> [INV], case 14400: <L4> [INV], case 19200: <L5> [INV], case 28800: <L6> [INV], case 38400: <L7> [INV], case 57600: <L8> [INV], case 115200: <L9> [INV], case 230400: <L10> [INV], case 460800: <L11> [INV], case 921600: <L12> [INV], case 1843200: <L13> [INV]>
- <bb 3> :
- <L0>:
- TempBaud_17 = 1200;
- goto <bb 18>; [INV]
- <bb 4> :
- <L1>:
- TempBaud_16 = 2400;
- goto <bb 18>; [INV]
- <bb 5> :
- <L2>:
- TempBaud_15 = 4800;
- goto <bb 18>; [INV]
- <bb 6> :
- <L3>:
- TempBaud_14 = 9600;
- goto <bb 18>; [INV]
- <bb 7> :
- <L4>:
- TempBaud_13 = 14400;
- goto <bb 18>; [INV]
- <bb 8> :
- <L5>:
- TempBaud_12 = 19200;
- goto <bb 18>; [INV]
- <bb 9> :
- <L6>:
- TempBaud_11 = 28800;
- goto <bb 18>; [INV]
- <bb 10> :
- <L7>:
- TempBaud_10 = 38400;
- goto <bb 18>; [INV]
- <bb 11> :
- <L8>:
- TempBaud_9 = 57600;
- goto <bb 18>; [INV]
- <bb 12> :
- <L9>:
- TempBaud_8 = 115200;
- goto <bb 18>; [INV]
- <bb 13> :
- <L10>:
- TempBaud_7 = 230400;
- goto <bb 18>; [INV]
- <bb 14> :
- <L11>:
- TempBaud_6 = 460800;
- goto <bb 18>; [INV]
- <bb 15> :
- <L12>:
- TempBaud_5 = 921600;
- goto <bb 18>; [INV]
- <bb 16> :
- <L13>:
- TempBaud_4 = 1843200;
- goto <bb 18>; [INV]
- <bb 17> :
- <L14>:
- <bb 18> :
- # TempBaud_1 = PHI <TempBaud_17(3), TempBaud_16(4), TempBaud_15(5), TempBaud_14(6), TempBaud_13(7), TempBaud_12(8), TempBaud_11(9), TempBaud_10(10), TempBaud_9(11), TempBaud_8(12), TempBaud_7(13), TempBaud_6(14), TempBaud_5(15), TempBaud_4(16), TempBaud_2(17)>
- _18 = TempBaud_1;
- <bb 19> :
- <L16>:
- return _18;
- }
- Uart_Ipw_LpuartConvertStatus (Lpuart_Uart_Ip_StatusType Status)
- {
- Uart_StatusType TempStatus;
- Uart_StatusType D.6350;
- Uart_StatusType _13;
- <bb 2> :
- TempStatus_2 = 6;
- switch (Status_3(D)) <default: <L8> [INV], case 0: <L0> [INV], case 2: <L1> [INV], case 3: <L3> [INV], case 5: <L5> [INV], case 6: <L2> [INV], case 7: <L4> [INV], case 8: <L7> [INV], case 9: <L6> [INV]>
- <bb 3> :
- <L0>:
- TempStatus_11 = 0;
- goto <bb 12>; [INV]
- <bb 4> :
- <L1>:
- TempStatus_10 = 1;
- goto <bb 12>; [INV]
- <bb 5> :
- <L2>:
- TempStatus_7 = 2;
- goto <bb 12>; [INV]
- <bb 6> :
- <L3>:
- TempStatus_9 = 6;
- goto <bb 12>; [INV]
- <bb 7> :
- <L4>:
- TempStatus_6 = 3;
- goto <bb 12>; [INV]
- <bb 8> :
- <L5>:
- TempStatus_8 = 4;
- goto <bb 12>; [INV]
- <bb 9> :
- <L6>:
- TempStatus_4 = 7;
- goto <bb 12>; [INV]
- <bb 10> :
- <L7>:
- TempStatus_5 = 5;
- goto <bb 12>; [INV]
- <bb 11> :
- <L8>:
- TempStatus_12 = 8;
- <bb 12> :
- # TempStatus_1 = PHI <TempStatus_11(3), TempStatus_10(4), TempStatus_7(5), TempStatus_9(6), TempStatus_6(7), TempStatus_8(8), TempStatus_4(9), TempStatus_5(10), TempStatus_12(11)>
- _13 = TempStatus_1;
- <bb 13> :
- <L10>:
- 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;
- <unnamed type> _5;
- Uart_StatusType _17;
- <bb 2> :
- 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 <bb 3>; [INV]
- else
- goto <bb 4>; [INV]
- <bb 3> :
- u32LpuartIpStatus_14 = Lpuart_Uart_Ip_GetReceiveStatus (HwUnit_11, BytesRemaining_12(D));
- TempStatus_16 = Uart_Ipw_LpuartConvertStatus (u32LpuartIpStatus_14);
- <bb 4> :
- # TempStatus_6 = PHI <TempStatus_8(2), TempStatus_16(3)>
- _17 = TempStatus_6;
- <bb 5> :
- <L2>:
- 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;
- <unnamed type> _5;
- Uart_StatusType _17;
- <bb 2> :
- 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 <bb 3>; [INV]
- else
- goto <bb 4>; [INV]
- <bb 3> :
- u32LpuartIpStatus_14 = Lpuart_Uart_Ip_GetTransmitStatus (HwUnit_11, BytesRemaining_12(D));
- TempStatus_16 = Uart_Ipw_LpuartConvertStatus (u32LpuartIpStatus_14);
- <bb 4> :
- # TempStatus_6 = PHI <TempStatus_8(2), TempStatus_16(3)>
- _17 = TempStatus_6;
- <bb 5> :
- <L2>:
- 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;
- <unnamed type> _5;
- <unnamed type> _6;
- Std_ReturnType _17;
- <bb 2> :
- 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 <bb 3>; [INV]
- else
- goto <bb 5>; [INV]
- <bb 3> :
- _6 = Lpuart_Uart_Ip_AsyncSend (HwUnit_12, Buffer_13(D), BufferSize_14(D));
- if (_6 == 0)
- goto <bb 4>; [INV]
- else
- goto <bb 5>; [INV]
- <bb 4> :
- TempStatus_16 = 0;
- <bb 5> :
- # TempStatus_7 = PHI <TempStatus_9(2), TempStatus_9(3), TempStatus_16(4)>
- _17 = TempStatus_7;
- <bb 6> :
- <L4>:
- 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;
- <unnamed type> _5;
- <unnamed type> _6;
- Std_ReturnType _17;
- <bb 2> :
- 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 <bb 3>; [INV]
- else
- goto <bb 5>; [INV]
- <bb 3> :
- _6 = Lpuart_Uart_Ip_AsyncReceive (HwUnit_12, Buffer_13(D), BufferSize_14(D));
- if (_6 == 0)
- goto <bb 4>; [INV]
- else
- goto <bb 5>; [INV]
- <bb 4> :
- TempStatus_16 = 0;
- <bb 5> :
- # TempStatus_7 = PHI <TempStatus_9(2), TempStatus_9(3), TempStatus_16(4)>
- _17 = TempStatus_7;
- <bb 6> :
- <L4>:
- 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;
- <unnamed type> _5;
- Std_ReturnType _20;
- <bb 2> :
- 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 <bb 3>; [INV]
- else
- goto <bb 8>; [INV]
- <bb 3> :
- u32LpuartIpStatus_16 = Lpuart_Uart_Ip_SyncReceive (HwUnit_11, Buffer_12(D), BufferSize_13(D), Timeout_14(D));
- if (u32LpuartIpStatus_16 == 0)
- goto <bb 4>; [INV]
- else
- goto <bb 5>; [INV]
- <bb 4> :
- TempStatus_19 = 0;
- goto <bb 8>; [INV]
- <bb 5> :
- if (u32LpuartIpStatus_16 == 3)
- goto <bb 6>; [INV]
- else
- goto <bb 7>; [INV]
- <bb 6> :
- TempStatus_18 = 6;
- goto <bb 8>; [INV]
- <bb 7> :
- TempStatus_17 = 1;
- <bb 8> :
- # TempStatus_6 = PHI <TempStatus_8(2), TempStatus_19(4), TempStatus_18(6), TempStatus_17(7)>
- _20 = TempStatus_6;
- <bb 9> :
- <L8>:
- 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;
- <unnamed type> _5;
- Std_ReturnType _20;
- <bb 2> :
- 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 <bb 3>; [INV]
- else
- goto <bb 8>; [INV]
- <bb 3> :
- u32LpuartIpStatus_16 = Lpuart_Uart_Ip_SyncSend (HwUnit_11, Buffer_12(D), BufferSize_13(D), Timeout_14(D));
- if (u32LpuartIpStatus_16 == 0)
- goto <bb 4>; [INV]
- else
- goto <bb 5>; [INV]
- <bb 4> :
- TempStatus_19 = 0;
- goto <bb 8>; [INV]
- <bb 5> :
- if (u32LpuartIpStatus_16 == 3)
- goto <bb 6>; [INV]
- else
- goto <bb 7>; [INV]
- <bb 6> :
- TempStatus_18 = 6;
- goto <bb 8>; [INV]
- <bb 7> :
- TempStatus_17 = 1;
- <bb 8> :
- # TempStatus_6 = PHI <TempStatus_8(2), TempStatus_19(4), TempStatus_18(6), TempStatus_17(7)>
- _20 = TempStatus_6;
- <bb 9> :
- <L8>:
- 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;
- <unnamed type> _5;
- <bb 2> :
- _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 <bb 3>; [INV]
- else
- goto <bb 4>; [INV]
- <bb 3> :
- Lpuart_Uart_Ip_SetRxBuffer (HwUnit_9, Buffer_10(D), BufferSize_11(D));
- <bb 4> :
- 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;
- <unnamed type> _5;
- <bb 2> :
- _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 <bb 3>; [INV]
- else
- goto <bb 4>; [INV]
- <bb 3> :
- Lpuart_Uart_Ip_SetTxBuffer (HwUnit_9, Buffer_10(D), BufferSize_11(D));
- <bb 4> :
- 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;
- <unnamed type> _5;
- <unnamed type> _6;
- Std_ReturnType _15;
- <bb 2> :
- 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 <bb 3>; [INV]
- else
- goto <bb 5>; [INV]
- <bb 3> :
- _6 = Lpuart_Uart_Ip_AbortReceivingData (HwUnit_12);
- if (_6 == 0)
- goto <bb 4>; [INV]
- else
- goto <bb 5>; [INV]
- <bb 4> :
- TempStatus_14 = 0;
- <bb 5> :
- # TempStatus_7 = PHI <TempStatus_9(2), TempStatus_9(3), TempStatus_14(4)>
- _15 = TempStatus_7;
- <bb 6> :
- <L4>:
- 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;
- <unnamed type> _5;
- <unnamed type> _6;
- Std_ReturnType _15;
- <bb 2> :
- 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 <bb 3>; [INV]
- else
- goto <bb 5>; [INV]
- <bb 3> :
- _6 = Lpuart_Uart_Ip_AbortSendingData (HwUnit_12);
- if (_6 == 0)
- goto <bb 4>; [INV]
- else
- goto <bb 5>; [INV]
- <bb 4> :
- TempStatus_14 = 0;
- <bb 5> :
- # TempStatus_7 = PHI <TempStatus_9(2), TempStatus_9(3), TempStatus_14(4)>
- _15 = TempStatus_7;
- <bb 6> :
- <L4>:
- 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;
- <unnamed type> _5;
- <bb 2> :
- _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 <bb 3>; [INV]
- else
- goto <bb 4>; [INV]
- <bb 3> :
- Lpuart_Uart_Ip_GetBaudRate (HwUnit_9, BaudrateValue_10(D));
- <bb 4> :
- 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;
- <unnamed type> _5;
- <unnamed type> _6;
- Std_ReturnType _19;
- <bb 2> :
- 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 <bb 3>; [INV]
- else
- goto <bb 5>; [INV]
- <bb 3> :
- _6 = Lpuart_Uart_Ip_SetBaudRate (HwUnit_12, LpuartBaud_15, ClockFrequency_16(D));
- if (_6 == 0)
- goto <bb 4>; [INV]
- else
- goto <bb 5>; [INV]
- <bb 4> :
- TempStatus_18 = 0;
- <bb 5> :
- # TempStatus_7 = PHI <TempStatus_9(2), TempStatus_9(3), TempStatus_18(4)>
- _19 = TempStatus_7;
- <bb 6> :
- <L4>:
- 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;
- <unnamed type> _5;
- int _6;
- int _7;
- <bb 2> :
- _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 <bb 3>; [INV]
- else
- goto <bb 4>; [INV]
- <bb 3> :
- _6 = (int) HwUnit_11;
- Uart_Ipw_s8HwMapping[_6] = -1;
- Lpuart_Uart_Ip_Deinit (HwUnit_11);
- <bb 4> :
- _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;
- <unnamed type> _4;
- int _5;
- signed char Channel.0_6;
- const struct Uart_Ipw_IpConfigType * _7;
- const struct Lpuart_Uart_Ip_UserConfigType * _8;
- <bb 2> :
- 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 <bb 3>; [INV]
- else
- goto <bb 4>; [INV]
- <bb 3> :
- _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);
- <bb 4> :
- return;
- }
|