Uart_Ipw.c.078i.free-fnsummary2 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851
  1. Uart_Ipw_LpuartCallback (const uint8 HwInstance, const Lpuart_Uart_Ip_EventType Event, void * UserData)
  2. {
  3. Uart_EventType ConvertEvent;
  4. uint8 Channel;
  5. int _1;
  6. signed char _2;
  7. int _3;
  8. const struct Uart_Ipw_HwConfigType * _4;
  9. void (*<T53e>) (uint8, Uart_EventType) _5;
  10. int _6;
  11. const struct Uart_Ipw_HwConfigType * _7;
  12. void (*<T53e>) (uint8, Uart_EventType) _8;
  13. <bb 2> :
  14. _1 = (int) HwInstance_10(D);
  15. _2 = Uart_Ipw_s8HwMapping[_1];
  16. Channel_12 = (uint8) _2;
  17. ConvertEvent_15 = Uart_Ipw_LpuartConvertEventType (Event_13(D));
  18. _3 = (int) Channel_12;
  19. _4 = Uart_Ipw_apChnConfig[_3];
  20. _5 = _4->Callback;
  21. if (_5 != 0B)
  22. goto <bb 3>; [INV]
  23. else
  24. goto <bb 4>; [INV]
  25. <bb 3> :
  26. _6 = (int) Channel_12;
  27. _7 = Uart_Ipw_apChnConfig[_6];
  28. _8 = _7->Callback;
  29. _8 (Channel_12, ConvertEvent_15);
  30. <bb 4> :
  31. return;
  32. }
  33. Uart_Ipw_LpuartConvertEventType (Lpuart_Uart_Ip_EventType Event)
  34. {
  35. Uart_EventType TempEvent;
  36. Uart_EventType D.6354;
  37. Uart_EventType _9;
  38. <bb 2> :
  39. TempEvent_2 = 3;
  40. 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]>
  41. <bb 3> :
  42. <L0>:
  43. TempEvent_8 = 0;
  44. goto <bb 9>; [INV]
  45. <bb 4> :
  46. <L1>:
  47. TempEvent_7 = 1;
  48. goto <bb 9>; [INV]
  49. <bb 5> :
  50. <L2>:
  51. TempEvent_6 = 2;
  52. goto <bb 9>; [INV]
  53. <bb 6> :
  54. <L3>:
  55. TempEvent_5 = 3;
  56. goto <bb 9>; [INV]
  57. <bb 7> :
  58. <L4>:
  59. TempEvent_4 = 4;
  60. goto <bb 9>; [INV]
  61. <bb 8> :
  62. <L5>:
  63. <bb 9> :
  64. # TempEvent_1 = PHI <TempEvent_8(3), TempEvent_7(4), TempEvent_6(5), TempEvent_5(6), TempEvent_4(7), TempEvent_2(8)>
  65. _9 = TempEvent_1;
  66. <bb 10> :
  67. <L7>:
  68. return _9;
  69. }
  70. Uart_Ipw_LpuartConvertBaudrateType (Uart_BaudrateType Baudrate)
  71. {
  72. Lpuart_Uart_Ip_BaudrateType TempBaud;
  73. Lpuart_Uart_Ip_BaudrateType D.6352;
  74. Lpuart_Uart_Ip_BaudrateType _18;
  75. <bb 2> :
  76. TempBaud_2 = 1200;
  77. 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]>
  78. <bb 3> :
  79. <L0>:
  80. TempBaud_17 = 1200;
  81. goto <bb 18>; [INV]
  82. <bb 4> :
  83. <L1>:
  84. TempBaud_16 = 2400;
  85. goto <bb 18>; [INV]
  86. <bb 5> :
  87. <L2>:
  88. TempBaud_15 = 4800;
  89. goto <bb 18>; [INV]
  90. <bb 6> :
  91. <L3>:
  92. TempBaud_14 = 9600;
  93. goto <bb 18>; [INV]
  94. <bb 7> :
  95. <L4>:
  96. TempBaud_13 = 14400;
  97. goto <bb 18>; [INV]
  98. <bb 8> :
  99. <L5>:
  100. TempBaud_12 = 19200;
  101. goto <bb 18>; [INV]
  102. <bb 9> :
  103. <L6>:
  104. TempBaud_11 = 28800;
  105. goto <bb 18>; [INV]
  106. <bb 10> :
  107. <L7>:
  108. TempBaud_10 = 38400;
  109. goto <bb 18>; [INV]
  110. <bb 11> :
  111. <L8>:
  112. TempBaud_9 = 57600;
  113. goto <bb 18>; [INV]
  114. <bb 12> :
  115. <L9>:
  116. TempBaud_8 = 115200;
  117. goto <bb 18>; [INV]
  118. <bb 13> :
  119. <L10>:
  120. TempBaud_7 = 230400;
  121. goto <bb 18>; [INV]
  122. <bb 14> :
  123. <L11>:
  124. TempBaud_6 = 460800;
  125. goto <bb 18>; [INV]
  126. <bb 15> :
  127. <L12>:
  128. TempBaud_5 = 921600;
  129. goto <bb 18>; [INV]
  130. <bb 16> :
  131. <L13>:
  132. TempBaud_4 = 1843200;
  133. goto <bb 18>; [INV]
  134. <bb 17> :
  135. <L14>:
  136. <bb 18> :
  137. # 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)>
  138. _18 = TempBaud_1;
  139. <bb 19> :
  140. <L16>:
  141. return _18;
  142. }
  143. Uart_Ipw_LpuartConvertStatus (Lpuart_Uart_Ip_StatusType Status)
  144. {
  145. Uart_StatusType TempStatus;
  146. Uart_StatusType D.6350;
  147. Uart_StatusType _13;
  148. <bb 2> :
  149. TempStatus_2 = 6;
  150. 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]>
  151. <bb 3> :
  152. <L0>:
  153. TempStatus_11 = 0;
  154. goto <bb 12>; [INV]
  155. <bb 4> :
  156. <L1>:
  157. TempStatus_10 = 1;
  158. goto <bb 12>; [INV]
  159. <bb 5> :
  160. <L2>:
  161. TempStatus_7 = 2;
  162. goto <bb 12>; [INV]
  163. <bb 6> :
  164. <L3>:
  165. TempStatus_9 = 6;
  166. goto <bb 12>; [INV]
  167. <bb 7> :
  168. <L4>:
  169. TempStatus_6 = 3;
  170. goto <bb 12>; [INV]
  171. <bb 8> :
  172. <L5>:
  173. TempStatus_8 = 4;
  174. goto <bb 12>; [INV]
  175. <bb 9> :
  176. <L6>:
  177. TempStatus_4 = 7;
  178. goto <bb 12>; [INV]
  179. <bb 10> :
  180. <L7>:
  181. TempStatus_5 = 5;
  182. goto <bb 12>; [INV]
  183. <bb 11> :
  184. <L8>:
  185. TempStatus_12 = 8;
  186. <bb 12> :
  187. # 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)>
  188. _13 = TempStatus_1;
  189. <bb 13> :
  190. <L10>:
  191. return _13;
  192. }
  193. Uart_Ipw_GetReceiveStatus (uint8 Channel, uint32 * BytesRemaining)
  194. {
  195. Lpuart_Uart_Ip_StatusType u32LpuartIpStatus;
  196. uint8 HwUnit;
  197. Uart_StatusType TempStatus;
  198. Uart_StatusType D.6348;
  199. int _1;
  200. const struct Uart_Ipw_HwConfigType * _2;
  201. int _3;
  202. const struct Uart_Ipw_HwConfigType * _4;
  203. <unnamed type> _5;
  204. Uart_StatusType _17;
  205. <bb 2> :
  206. TempStatus_8 = 6;
  207. _1 = (int) Channel_9(D);
  208. _2 = Uart_Ipw_apChnConfig[_1];
  209. HwUnit_11 = _2->UartHwChannel;
  210. _3 = (int) Channel_9(D);
  211. _4 = Uart_Ipw_apChnConfig[_3];
  212. _5 = _4->UartIpType;
  213. if (_5 == 0)
  214. goto <bb 3>; [INV]
  215. else
  216. goto <bb 4>; [INV]
  217. <bb 3> :
  218. u32LpuartIpStatus_14 = Lpuart_Uart_Ip_GetReceiveStatus (HwUnit_11, BytesRemaining_12(D));
  219. TempStatus_16 = Uart_Ipw_LpuartConvertStatus (u32LpuartIpStatus_14);
  220. <bb 4> :
  221. # TempStatus_6 = PHI <TempStatus_8(2), TempStatus_16(3)>
  222. _17 = TempStatus_6;
  223. <bb 5> :
  224. <L2>:
  225. return _17;
  226. }
  227. Uart_Ipw_GetTransmitStatus (uint8 Channel, uint32 * BytesRemaining)
  228. {
  229. Lpuart_Uart_Ip_StatusType u32LpuartIpStatus;
  230. uint8 HwUnit;
  231. Uart_StatusType TempStatus;
  232. Uart_StatusType D.6344;
  233. int _1;
  234. const struct Uart_Ipw_HwConfigType * _2;
  235. int _3;
  236. const struct Uart_Ipw_HwConfigType * _4;
  237. <unnamed type> _5;
  238. Uart_StatusType _17;
  239. <bb 2> :
  240. TempStatus_8 = 6;
  241. _1 = (int) Channel_9(D);
  242. _2 = Uart_Ipw_apChnConfig[_1];
  243. HwUnit_11 = _2->UartHwChannel;
  244. _3 = (int) Channel_9(D);
  245. _4 = Uart_Ipw_apChnConfig[_3];
  246. _5 = _4->UartIpType;
  247. if (_5 == 0)
  248. goto <bb 3>; [INV]
  249. else
  250. goto <bb 4>; [INV]
  251. <bb 3> :
  252. u32LpuartIpStatus_14 = Lpuart_Uart_Ip_GetTransmitStatus (HwUnit_11, BytesRemaining_12(D));
  253. TempStatus_16 = Uart_Ipw_LpuartConvertStatus (u32LpuartIpStatus_14);
  254. <bb 4> :
  255. # TempStatus_6 = PHI <TempStatus_8(2), TempStatus_16(3)>
  256. _17 = TempStatus_6;
  257. <bb 5> :
  258. <L2>:
  259. return _17;
  260. }
  261. Uart_Ipw_AsyncSend (uint8 Channel, const uint8 * Buffer, uint32 BufferSize)
  262. {
  263. uint8 HwUnit;
  264. Std_ReturnType TempStatus;
  265. Std_ReturnType D.6340;
  266. int _1;
  267. const struct Uart_Ipw_HwConfigType * _2;
  268. int _3;
  269. const struct Uart_Ipw_HwConfigType * _4;
  270. <unnamed type> _5;
  271. <unnamed type> _6;
  272. Std_ReturnType _17;
  273. <bb 2> :
  274. TempStatus_9 = 1;
  275. _1 = (int) Channel_10(D);
  276. _2 = Uart_Ipw_apChnConfig[_1];
  277. HwUnit_12 = _2->UartHwChannel;
  278. _3 = (int) Channel_10(D);
  279. _4 = Uart_Ipw_apChnConfig[_3];
  280. _5 = _4->UartIpType;
  281. if (_5 == 0)
  282. goto <bb 3>; [INV]
  283. else
  284. goto <bb 5>; [INV]
  285. <bb 3> :
  286. _6 = Lpuart_Uart_Ip_AsyncSend (HwUnit_12, Buffer_13(D), BufferSize_14(D));
  287. if (_6 == 0)
  288. goto <bb 4>; [INV]
  289. else
  290. goto <bb 5>; [INV]
  291. <bb 4> :
  292. TempStatus_16 = 0;
  293. <bb 5> :
  294. # TempStatus_7 = PHI <TempStatus_9(2), TempStatus_9(3), TempStatus_16(4)>
  295. _17 = TempStatus_7;
  296. <bb 6> :
  297. <L4>:
  298. return _17;
  299. }
  300. Uart_Ipw_AsyncReceive (uint8 Channel, uint8 * Buffer, uint32 BufferSize)
  301. {
  302. uint8 HwUnit;
  303. Std_ReturnType TempStatus;
  304. Std_ReturnType D.6334;
  305. int _1;
  306. const struct Uart_Ipw_HwConfigType * _2;
  307. int _3;
  308. const struct Uart_Ipw_HwConfigType * _4;
  309. <unnamed type> _5;
  310. <unnamed type> _6;
  311. Std_ReturnType _17;
  312. <bb 2> :
  313. TempStatus_9 = 1;
  314. _1 = (int) Channel_10(D);
  315. _2 = Uart_Ipw_apChnConfig[_1];
  316. HwUnit_12 = _2->UartHwChannel;
  317. _3 = (int) Channel_10(D);
  318. _4 = Uart_Ipw_apChnConfig[_3];
  319. _5 = _4->UartIpType;
  320. if (_5 == 0)
  321. goto <bb 3>; [INV]
  322. else
  323. goto <bb 5>; [INV]
  324. <bb 3> :
  325. _6 = Lpuart_Uart_Ip_AsyncReceive (HwUnit_12, Buffer_13(D), BufferSize_14(D));
  326. if (_6 == 0)
  327. goto <bb 4>; [INV]
  328. else
  329. goto <bb 5>; [INV]
  330. <bb 4> :
  331. TempStatus_16 = 0;
  332. <bb 5> :
  333. # TempStatus_7 = PHI <TempStatus_9(2), TempStatus_9(3), TempStatus_16(4)>
  334. _17 = TempStatus_7;
  335. <bb 6> :
  336. <L4>:
  337. return _17;
  338. }
  339. Uart_Ipw_SyncReceive (uint8 Channel, uint8 * Buffer, uint32 BufferSize, uint32 Timeout)
  340. {
  341. Lpuart_Uart_Ip_StatusType u32LpuartIpStatus;
  342. uint8 HwUnit;
  343. Std_ReturnType TempStatus;
  344. Std_ReturnType D.6328;
  345. int _1;
  346. const struct Uart_Ipw_HwConfigType * _2;
  347. int _3;
  348. const struct Uart_Ipw_HwConfigType * _4;
  349. <unnamed type> _5;
  350. Std_ReturnType _20;
  351. <bb 2> :
  352. TempStatus_8 = 1;
  353. _1 = (int) Channel_9(D);
  354. _2 = Uart_Ipw_apChnConfig[_1];
  355. HwUnit_11 = _2->UartHwChannel;
  356. _3 = (int) Channel_9(D);
  357. _4 = Uart_Ipw_apChnConfig[_3];
  358. _5 = _4->UartIpType;
  359. if (_5 == 0)
  360. goto <bb 3>; [INV]
  361. else
  362. goto <bb 8>; [INV]
  363. <bb 3> :
  364. u32LpuartIpStatus_16 = Lpuart_Uart_Ip_SyncReceive (HwUnit_11, Buffer_12(D), BufferSize_13(D), Timeout_14(D));
  365. if (u32LpuartIpStatus_16 == 0)
  366. goto <bb 4>; [INV]
  367. else
  368. goto <bb 5>; [INV]
  369. <bb 4> :
  370. TempStatus_19 = 0;
  371. goto <bb 8>; [INV]
  372. <bb 5> :
  373. if (u32LpuartIpStatus_16 == 3)
  374. goto <bb 6>; [INV]
  375. else
  376. goto <bb 7>; [INV]
  377. <bb 6> :
  378. TempStatus_18 = 6;
  379. goto <bb 8>; [INV]
  380. <bb 7> :
  381. TempStatus_17 = 1;
  382. <bb 8> :
  383. # TempStatus_6 = PHI <TempStatus_8(2), TempStatus_19(4), TempStatus_18(6), TempStatus_17(7)>
  384. _20 = TempStatus_6;
  385. <bb 9> :
  386. <L8>:
  387. return _20;
  388. }
  389. Uart_Ipw_SyncSend (uint8 Channel, const uint8 * Buffer, uint32 BufferSize, uint32 Timeout)
  390. {
  391. Lpuart_Uart_Ip_StatusType u32LpuartIpStatus;
  392. uint8 HwUnit;
  393. Std_ReturnType TempStatus;
  394. Std_ReturnType D.6318;
  395. int _1;
  396. const struct Uart_Ipw_HwConfigType * _2;
  397. int _3;
  398. const struct Uart_Ipw_HwConfigType * _4;
  399. <unnamed type> _5;
  400. Std_ReturnType _20;
  401. <bb 2> :
  402. TempStatus_8 = 1;
  403. _1 = (int) Channel_9(D);
  404. _2 = Uart_Ipw_apChnConfig[_1];
  405. HwUnit_11 = _2->UartHwChannel;
  406. _3 = (int) Channel_9(D);
  407. _4 = Uart_Ipw_apChnConfig[_3];
  408. _5 = _4->UartIpType;
  409. if (_5 == 0)
  410. goto <bb 3>; [INV]
  411. else
  412. goto <bb 8>; [INV]
  413. <bb 3> :
  414. u32LpuartIpStatus_16 = Lpuart_Uart_Ip_SyncSend (HwUnit_11, Buffer_12(D), BufferSize_13(D), Timeout_14(D));
  415. if (u32LpuartIpStatus_16 == 0)
  416. goto <bb 4>; [INV]
  417. else
  418. goto <bb 5>; [INV]
  419. <bb 4> :
  420. TempStatus_19 = 0;
  421. goto <bb 8>; [INV]
  422. <bb 5> :
  423. if (u32LpuartIpStatus_16 == 3)
  424. goto <bb 6>; [INV]
  425. else
  426. goto <bb 7>; [INV]
  427. <bb 6> :
  428. TempStatus_18 = 6;
  429. goto <bb 8>; [INV]
  430. <bb 7> :
  431. TempStatus_17 = 1;
  432. <bb 8> :
  433. # TempStatus_6 = PHI <TempStatus_8(2), TempStatus_19(4), TempStatus_18(6), TempStatus_17(7)>
  434. _20 = TempStatus_6;
  435. <bb 9> :
  436. <L8>:
  437. return _20;
  438. }
  439. Uart_Ipw_SetRxBuffer (uint8 Channel, uint8 * Buffer, uint32 BufferSize)
  440. {
  441. uint8 HwUnit;
  442. int _1;
  443. const struct Uart_Ipw_HwConfigType * _2;
  444. int _3;
  445. const struct Uart_Ipw_HwConfigType * _4;
  446. <unnamed type> _5;
  447. <bb 2> :
  448. _1 = (int) Channel_7(D);
  449. _2 = Uart_Ipw_apChnConfig[_1];
  450. HwUnit_9 = _2->UartHwChannel;
  451. _3 = (int) Channel_7(D);
  452. _4 = Uart_Ipw_apChnConfig[_3];
  453. _5 = _4->UartIpType;
  454. if (_5 == 0)
  455. goto <bb 3>; [INV]
  456. else
  457. goto <bb 4>; [INV]
  458. <bb 3> :
  459. Lpuart_Uart_Ip_SetRxBuffer (HwUnit_9, Buffer_10(D), BufferSize_11(D));
  460. <bb 4> :
  461. return;
  462. }
  463. Uart_Ipw_SetTxBuffer (uint8 Channel, const uint8 * Buffer, uint32 BufferSize)
  464. {
  465. uint8 HwUnit;
  466. int _1;
  467. const struct Uart_Ipw_HwConfigType * _2;
  468. int _3;
  469. const struct Uart_Ipw_HwConfigType * _4;
  470. <unnamed type> _5;
  471. <bb 2> :
  472. _1 = (int) Channel_7(D);
  473. _2 = Uart_Ipw_apChnConfig[_1];
  474. HwUnit_9 = _2->UartHwChannel;
  475. _3 = (int) Channel_7(D);
  476. _4 = Uart_Ipw_apChnConfig[_3];
  477. _5 = _4->UartIpType;
  478. if (_5 == 0)
  479. goto <bb 3>; [INV]
  480. else
  481. goto <bb 4>; [INV]
  482. <bb 3> :
  483. Lpuart_Uart_Ip_SetTxBuffer (HwUnit_9, Buffer_10(D), BufferSize_11(D));
  484. <bb 4> :
  485. return;
  486. }
  487. Uart_Ipw_AbortReceivingData (uint8 Channel)
  488. {
  489. uint8 HwUnit;
  490. Std_ReturnType TempStatus;
  491. Std_ReturnType D.6304;
  492. int _1;
  493. const struct Uart_Ipw_HwConfigType * _2;
  494. int _3;
  495. const struct Uart_Ipw_HwConfigType * _4;
  496. <unnamed type> _5;
  497. <unnamed type> _6;
  498. Std_ReturnType _15;
  499. <bb 2> :
  500. TempStatus_9 = 1;
  501. _1 = (int) Channel_10(D);
  502. _2 = Uart_Ipw_apChnConfig[_1];
  503. HwUnit_12 = _2->UartHwChannel;
  504. _3 = (int) Channel_10(D);
  505. _4 = Uart_Ipw_apChnConfig[_3];
  506. _5 = _4->UartIpType;
  507. if (_5 == 0)
  508. goto <bb 3>; [INV]
  509. else
  510. goto <bb 5>; [INV]
  511. <bb 3> :
  512. _6 = Lpuart_Uart_Ip_AbortReceivingData (HwUnit_12);
  513. if (_6 == 0)
  514. goto <bb 4>; [INV]
  515. else
  516. goto <bb 5>; [INV]
  517. <bb 4> :
  518. TempStatus_14 = 0;
  519. <bb 5> :
  520. # TempStatus_7 = PHI <TempStatus_9(2), TempStatus_9(3), TempStatus_14(4)>
  521. _15 = TempStatus_7;
  522. <bb 6> :
  523. <L4>:
  524. return _15;
  525. }
  526. Uart_Ipw_AbortSendingData (uint8 Channel)
  527. {
  528. uint8 HwUnit;
  529. Std_ReturnType TempStatus;
  530. Std_ReturnType D.6298;
  531. int _1;
  532. const struct Uart_Ipw_HwConfigType * _2;
  533. int _3;
  534. const struct Uart_Ipw_HwConfigType * _4;
  535. <unnamed type> _5;
  536. <unnamed type> _6;
  537. Std_ReturnType _15;
  538. <bb 2> :
  539. TempStatus_9 = 1;
  540. _1 = (int) Channel_10(D);
  541. _2 = Uart_Ipw_apChnConfig[_1];
  542. HwUnit_12 = _2->UartHwChannel;
  543. _3 = (int) Channel_10(D);
  544. _4 = Uart_Ipw_apChnConfig[_3];
  545. _5 = _4->UartIpType;
  546. if (_5 == 0)
  547. goto <bb 3>; [INV]
  548. else
  549. goto <bb 5>; [INV]
  550. <bb 3> :
  551. _6 = Lpuart_Uart_Ip_AbortSendingData (HwUnit_12);
  552. if (_6 == 0)
  553. goto <bb 4>; [INV]
  554. else
  555. goto <bb 5>; [INV]
  556. <bb 4> :
  557. TempStatus_14 = 0;
  558. <bb 5> :
  559. # TempStatus_7 = PHI <TempStatus_9(2), TempStatus_9(3), TempStatus_14(4)>
  560. _15 = TempStatus_7;
  561. <bb 6> :
  562. <L4>:
  563. return _15;
  564. }
  565. Uart_Ipw_GetBaudrate (uint8 Channel, uint32 * BaudrateValue)
  566. {
  567. uint8 HwUnit;
  568. int _1;
  569. const struct Uart_Ipw_HwConfigType * _2;
  570. int _3;
  571. const struct Uart_Ipw_HwConfigType * _4;
  572. <unnamed type> _5;
  573. <bb 2> :
  574. _1 = (int) Channel_7(D);
  575. _2 = Uart_Ipw_apChnConfig[_1];
  576. HwUnit_9 = _2->UartHwChannel;
  577. _3 = (int) Channel_7(D);
  578. _4 = Uart_Ipw_apChnConfig[_3];
  579. _5 = _4->UartIpType;
  580. if (_5 == 0)
  581. goto <bb 3>; [INV]
  582. else
  583. goto <bb 4>; [INV]
  584. <bb 3> :
  585. Lpuart_Uart_Ip_GetBaudRate (HwUnit_9, BaudrateValue_10(D));
  586. <bb 4> :
  587. return;
  588. }
  589. Uart_Ipw_SetBaudrate (uint8 Channel, Uart_BaudrateType BaudRateValue, uint32 ClockFrequency)
  590. {
  591. Lpuart_Uart_Ip_BaudrateType LpuartBaud;
  592. uint8 HwUnit;
  593. Std_ReturnType TempStatus;
  594. Std_ReturnType D.6290;
  595. int _1;
  596. const struct Uart_Ipw_HwConfigType * _2;
  597. int _3;
  598. const struct Uart_Ipw_HwConfigType * _4;
  599. <unnamed type> _5;
  600. <unnamed type> _6;
  601. Std_ReturnType _19;
  602. <bb 2> :
  603. TempStatus_9 = 1;
  604. _1 = (int) Channel_10(D);
  605. _2 = Uart_Ipw_apChnConfig[_1];
  606. HwUnit_12 = _2->UartHwChannel;
  607. LpuartBaud_15 = Uart_Ipw_LpuartConvertBaudrateType (BaudRateValue_13(D));
  608. _3 = (int) Channel_10(D);
  609. _4 = Uart_Ipw_apChnConfig[_3];
  610. _5 = _4->UartIpType;
  611. if (_5 == 0)
  612. goto <bb 3>; [INV]
  613. else
  614. goto <bb 5>; [INV]
  615. <bb 3> :
  616. _6 = Lpuart_Uart_Ip_SetBaudRate (HwUnit_12, LpuartBaud_15, ClockFrequency_16(D));
  617. if (_6 == 0)
  618. goto <bb 4>; [INV]
  619. else
  620. goto <bb 5>; [INV]
  621. <bb 4> :
  622. TempStatus_18 = 0;
  623. <bb 5> :
  624. # TempStatus_7 = PHI <TempStatus_9(2), TempStatus_9(3), TempStatus_18(4)>
  625. _19 = TempStatus_7;
  626. <bb 6> :
  627. <L4>:
  628. return _19;
  629. }
  630. Uart_Ipw_Deinit (uint8 Channel)
  631. {
  632. uint8 HwUnit;
  633. int _1;
  634. const struct Uart_Ipw_HwConfigType * _2;
  635. int _3;
  636. const struct Uart_Ipw_HwConfigType * _4;
  637. <unnamed type> _5;
  638. int _6;
  639. int _7;
  640. <bb 2> :
  641. _1 = (int) Channel_9(D);
  642. _2 = Uart_Ipw_apChnConfig[_1];
  643. HwUnit_11 = _2->UartHwChannel;
  644. _3 = (int) Channel_9(D);
  645. _4 = Uart_Ipw_apChnConfig[_3];
  646. _5 = _4->UartIpType;
  647. if (_5 == 0)
  648. goto <bb 3>; [INV]
  649. else
  650. goto <bb 4>; [INV]
  651. <bb 3> :
  652. _6 = (int) HwUnit_11;
  653. Uart_Ipw_s8HwMapping[_6] = -1;
  654. Lpuart_Uart_Ip_Deinit (HwUnit_11);
  655. <bb 4> :
  656. _7 = (int) Channel_9(D);
  657. Uart_Ipw_apChnConfig[_7] = 0B;
  658. return;
  659. }
  660. Uart_Ipw_Init (uint8 Channel, const struct Uart_Ipw_HwConfigType * Config)
  661. {
  662. uint8 HwUnit;
  663. int _1;
  664. int _2;
  665. const struct Uart_Ipw_HwConfigType * _3;
  666. <unnamed type> _4;
  667. int _5;
  668. signed char Channel.0_6;
  669. const struct Uart_Ipw_IpConfigType * _7;
  670. const struct Lpuart_Uart_Ip_UserConfigType * _8;
  671. <bb 2> :
  672. HwUnit_12 = Config_11(D)->UartHwChannel;
  673. _1 = (int) Channel_13(D);
  674. Uart_Ipw_apChnConfig[_1] = Config_11(D);
  675. _2 = (int) Channel_13(D);
  676. _3 = Uart_Ipw_apChnConfig[_2];
  677. _4 = _3->UartIpType;
  678. if (_4 == 0)
  679. goto <bb 3>; [INV]
  680. else
  681. goto <bb 4>; [INV]
  682. <bb 3> :
  683. _5 = (int) HwUnit_12;
  684. Channel.0_6 = (signed char) Channel_13(D);
  685. Uart_Ipw_s8HwMapping[_5] = Channel.0_6;
  686. _7 = Config_11(D)->UserConfig;
  687. _8 = _7->LpuartUserConfig;
  688. Lpuart_Uart_Ip_Init (HwUnit_12, _8);
  689. <bb 4> :
  690. return;
  691. }