57 #if (defined(PDL_PERIPHERAL_MFS_ACTIVE))
69 #define MFS_MASTER_CLK_HCR (0x00u)
70 #define MFS_MASTER_CLK_MAIN (0x01u)
71 #define MFS_MASTER_CLK_PLL (0x02u)
72 #define MFS_MASTER_CLK_LCR (0x04u)
73 #define MFS_MASTER_CLK_SUB (0x05u)
76 #define MFS_BASE_CLK_DIV1 (0x00u)
77 #define MFS_BASE_CLK_DIV2 (0x01u)
78 #define MFS_BASE_CLK_DIV3 (0x02u)
79 #define MFS_BASE_CLK_DIV4 (0x03u)
80 #define MFS_BASE_CLK_DIV6 (0x04u)
81 #define MFS_BASE_CLK_DIV8 (0x05u)
82 #define MFS_BASE_CLK_DIV16 (0x06u)
85 #define MFS_NUM_1 (0x01u)
86 #define MFS_NUM_2 (0x02u)
87 #define MFS_NUM_3 (0x03u)
88 #define MFS_NUM_4 (0x04u)
89 #define MFS_NUM_5 (0x05u)
90 #define MFS_NUM_6 (0x06u)
91 #define MFS_NUM_7 (0x07u)
92 #define MFS_NUM_8 (0x08u)
93 #define MFS_NUM_16 (0x10u)
96 #define MFS_BGR_MASK (0x7FFFu)
99 #define MFS_PLL_CTL1_MASK (0x0Fu)
100 #define MFS_PLL_CTL2_MASK (0x3Fu)
109 #if (PDL_PERIPHERAL_ENABLE_MFS0 == PDL_ON)
115 #if (PDL_PERIPHERAL_ENABLE_MFS1 == PDL_ON)
121 #if (PDL_PERIPHERAL_ENABLE_MFS2 == PDL_ON)
127 #if (PDL_PERIPHERAL_ENABLE_MFS3 == PDL_ON)
133 #if (PDL_PERIPHERAL_ENABLE_MFS4 == PDL_ON)
139 #if (PDL_PERIPHERAL_ENABLE_MFS5 == PDL_ON)
145 #if (PDL_PERIPHERAL_ENABLE_MFS6 == PDL_ON)
151 #if (PDL_PERIPHERAL_ENABLE_MFS7 == PDL_ON)
157 #if (PDL_PERIPHERAL_ENABLE_MFS8 == PDL_ON)
163 #if (PDL_PERIPHERAL_ENABLE_MFS9 == PDL_ON)
169 #if (PDL_PERIPHERAL_ENABLE_MFS10 == PDL_ON)
175 #if (PDL_PERIPHERAL_ENABLE_MFS11 == PDL_ON)
181 #if (PDL_PERIPHERAL_ENABLE_MFS12 == PDL_ON)
187 #if (PDL_PERIPHERAL_ENABLE_MFS13 == PDL_ON)
193 #if (PDL_PERIPHERAL_ENABLE_MFS14 == PDL_ON)
199 #if (PDL_PERIPHERAL_ENABLE_MFS15 == PDL_ON)
236 uint32_t u32Instance;
242 if (pstcMfs == m_astcMfsInstanceDataLut[u32Instance].pstcInstance)
244 pstcInternDataPtr = &m_astcMfsInstanceDataLut[u32Instance].
stcInternData;
250 return (pstcInternDataPtr);
265 #if (PDL_PERIPHERAL_ENABLE_MFS0 == PDL_ON)
266 if (pstcMfs == &
MFS0)
269 NVIC_ClearPendingIRQ(MFS0_TX_IRQn);
270 NVIC_EnableIRQ(MFS0_TX_IRQn);
275 #if (PDL_PERIPHERAL_ENABLE_MFS1 == PDL_ON)
276 if (pstcMfs == &
MFS1)
279 NVIC_ClearPendingIRQ(MFS1_TX_IRQn);
280 NVIC_EnableIRQ(MFS1_TX_IRQn);
285 #if (PDL_PERIPHERAL_ENABLE_MFS2 == PDL_ON)
286 if (pstcMfs == &
MFS2)
289 NVIC_ClearPendingIRQ(MFS2_TX_IRQn);
290 NVIC_EnableIRQ(MFS2_TX_IRQn);
295 #if (PDL_PERIPHERAL_ENABLE_MFS3 == PDL_ON)
296 if (pstcMfs == &
MFS3)
299 NVIC_ClearPendingIRQ(MFS3_TX_IRQn);
300 NVIC_EnableIRQ(MFS3_TX_IRQn);
305 #if (PDL_PERIPHERAL_ENABLE_MFS4 == PDL_ON)
306 if (pstcMfs == &
MFS4)
309 NVIC_ClearPendingIRQ(MFS4_TX_IRQn);
310 NVIC_EnableIRQ(MFS4_TX_IRQn);
315 #if (PDL_PERIPHERAL_ENABLE_MFS5 == PDL_ON)
316 if (pstcMfs == &
MFS5)
319 NVIC_ClearPendingIRQ(MFS5_TX_IRQn);
320 NVIC_EnableIRQ(MFS5_TX_IRQn);
325 #if (PDL_PERIPHERAL_ENABLE_MFS6 == PDL_ON)
326 if (pstcMfs == &
MFS6)
329 NVIC_ClearPendingIRQ(MFS6_TX_IRQn);
330 NVIC_EnableIRQ(MFS6_TX_IRQn);
335 #if (PDL_PERIPHERAL_ENABLE_MFS7 == PDL_ON)
336 if (pstcMfs == &
MFS7)
339 NVIC_ClearPendingIRQ(MFS7_TX_IRQn);
340 NVIC_EnableIRQ(MFS7_TX_IRQn);
345 #if (PDL_PERIPHERAL_ENABLE_MFS8 == PDL_ON)
346 if (pstcMfs == &
MFS8)
349 NVIC_ClearPendingIRQ(MFS8_TX_IRQn);
350 NVIC_EnableIRQ(MFS8_TX_IRQn);
355 #if (PDL_PERIPHERAL_ENABLE_MFS9 == PDL_ON)
356 if (pstcMfs == &
MFS9)
359 NVIC_ClearPendingIRQ(MFS9_TX_IRQn);
360 NVIC_EnableIRQ(MFS9_TX_IRQn);
365 #if (PDL_PERIPHERAL_ENABLE_MFS10 == PDL_ON)
366 if (pstcMfs == &
MFS10)
369 NVIC_ClearPendingIRQ(MFS10_TX_IRQn);
370 NVIC_EnableIRQ(MFS10_TX_IRQn);
375 #if (PDL_PERIPHERAL_ENABLE_MFS11 == PDL_ON)
376 if (pstcMfs == &
MFS11)
379 NVIC_ClearPendingIRQ(MFS11_TX_IRQn);
380 NVIC_EnableIRQ(MFS11_TX_IRQn);
385 #if (PDL_PERIPHERAL_ENABLE_MFS12 == PDL_ON)
386 if (pstcMfs == &
MFS12)
389 NVIC_ClearPendingIRQ(MFS12_TX_IRQn);
390 NVIC_EnableIRQ(MFS12_TX_IRQn);
395 #if (PDL_PERIPHERAL_ENABLE_MFS13 == PDL_ON)
396 if (pstcMfs == &
MFS13)
399 NVIC_ClearPendingIRQ(MFS13_TX_IRQn);
400 NVIC_EnableIRQ(MFS13_TX_IRQn);
405 #if (PDL_PERIPHERAL_ENABLE_MFS14 == PDL_ON)
406 if (pstcMfs == &
MFS14)
409 NVIC_ClearPendingIRQ(MFS14_TX_IRQn);
410 NVIC_EnableIRQ(MFS14_TX_IRQn);
415 #if (PDL_PERIPHERAL_ENABLE_MFS15 == PDL_ON)
416 if (pstcMfs == &
MFS15)
419 NVIC_ClearPendingIRQ(MFS15_TX_IRQn);
420 NVIC_EnableIRQ(MFS15_TX_IRQn);
440 #if (PDL_PERIPHERAL_ENABLE_MFS0 == PDL_ON)
441 if (pstcMfs == &
MFS0)
444 NVIC_ClearPendingIRQ(MFS0_RX_IRQn);
445 NVIC_EnableIRQ(MFS0_RX_IRQn);
450 #if (PDL_PERIPHERAL_ENABLE_MFS1 == PDL_ON)
451 if (pstcMfs == &
MFS1)
454 NVIC_ClearPendingIRQ(MFS1_RX_IRQn);
455 NVIC_EnableIRQ(MFS1_RX_IRQn);
460 #if (PDL_PERIPHERAL_ENABLE_MFS2 == PDL_ON)
461 if (pstcMfs == &
MFS2)
464 NVIC_ClearPendingIRQ(MFS2_RX_IRQn);
465 NVIC_EnableIRQ(MFS2_RX_IRQn);
470 #if (PDL_PERIPHERAL_ENABLE_MFS3 == PDL_ON)
471 if (pstcMfs == &
MFS3)
474 NVIC_ClearPendingIRQ(MFS3_RX_IRQn);
475 NVIC_EnableIRQ(MFS3_RX_IRQn);
480 #if (PDL_PERIPHERAL_ENABLE_MFS4 == PDL_ON)
481 if (pstcMfs == &
MFS4)
484 NVIC_ClearPendingIRQ(MFS4_RX_IRQn);
485 NVIC_EnableIRQ(MFS4_RX_IRQn);
490 #if (PDL_PERIPHERAL_ENABLE_MFS5 == PDL_ON)
491 if (pstcMfs == &
MFS5)
494 NVIC_ClearPendingIRQ(MFS5_RX_IRQn);
495 NVIC_EnableIRQ(MFS5_RX_IRQn);
500 #if (PDL_PERIPHERAL_ENABLE_MFS6 == PDL_ON)
501 if (pstcMfs == &
MFS6)
504 NVIC_ClearPendingIRQ(MFS6_RX_IRQn);
505 NVIC_EnableIRQ(MFS6_RX_IRQn);
510 #if (PDL_PERIPHERAL_ENABLE_MFS7 == PDL_ON)
511 if (pstcMfs == &
MFS7)
514 NVIC_ClearPendingIRQ(MFS7_RX_IRQn);
515 NVIC_EnableIRQ(MFS7_RX_IRQn);
520 #if (PDL_PERIPHERAL_ENABLE_MFS8 == PDL_ON)
521 if (pstcMfs == &
MFS8)
524 NVIC_ClearPendingIRQ(MFS8_RX_IRQn);
525 NVIC_EnableIRQ(MFS8_RX_IRQn);
530 #if (PDL_PERIPHERAL_ENABLE_MFS9 == PDL_ON)
531 if (pstcMfs == &
MFS9)
534 NVIC_ClearPendingIRQ(MFS9_RX_IRQn);
535 NVIC_EnableIRQ(MFS9_RX_IRQn);
540 #if (PDL_PERIPHERAL_ENABLE_MFS10 == PDL_ON)
541 if (pstcMfs == &
MFS10)
544 NVIC_ClearPendingIRQ(MFS10_RX_IRQn);
545 NVIC_EnableIRQ(MFS10_RX_IRQn);
550 #if (PDL_PERIPHERAL_ENABLE_MFS11 == PDL_ON)
551 if (pstcMfs == &
MFS11)
554 NVIC_ClearPendingIRQ(MFS11_RX_IRQn);
555 NVIC_EnableIRQ(MFS11_RX_IRQn);
560 #if (PDL_PERIPHERAL_ENABLE_MFS12 == PDL_ON)
561 if (pstcMfs == &
MFS12)
564 NVIC_ClearPendingIRQ(MFS12_RX_IRQn);
565 NVIC_EnableIRQ(MFS12_RX_IRQn);
570 #if (PDL_PERIPHERAL_ENABLE_MFS13 == PDL_ON)
571 if (pstcMfs == &
MFS13)
574 NVIC_ClearPendingIRQ(MFS13_RX_IRQn);
575 NVIC_EnableIRQ(MFS13_RX_IRQn);
580 #if (PDL_PERIPHERAL_ENABLE_MFS14 == PDL_ON)
581 if (pstcMfs == &
MFS14)
584 NVIC_ClearPendingIRQ(MFS14_RX_IRQn);
585 NVIC_EnableIRQ(MFS14_RX_IRQn);
590 #if (PDL_PERIPHERAL_ENABLE_MFS15 == PDL_ON)
591 if (pstcMfs == &
MFS15)
594 NVIC_ClearPendingIRQ(MFS15_RX_IRQn);
595 NVIC_EnableIRQ(MFS15_RX_IRQn);
614 #if (PDL_PERIPHERAL_ENABLE_MFS0 == PDL_ON)
615 if (pstcMfs == &
MFS0)
618 NVIC_ClearPendingIRQ(MFS0_TX_IRQn);
619 NVIC_DisableIRQ(MFS0_TX_IRQn);
622 NVIC_ClearPendingIRQ(MFS0_RX_IRQn);
623 NVIC_DisableIRQ(MFS0_RX_IRQn);
628 #if (PDL_PERIPHERAL_ENABLE_MFS1 == PDL_ON)
629 if (pstcMfs == &
MFS1)
632 NVIC_ClearPendingIRQ(MFS1_TX_IRQn);
633 NVIC_DisableIRQ(MFS1_TX_IRQn);
636 NVIC_ClearPendingIRQ(MFS1_RX_IRQn);
637 NVIC_DisableIRQ(MFS1_RX_IRQn);
642 #if (PDL_PERIPHERAL_ENABLE_MFS2 == PDL_ON)
643 if (pstcMfs == &
MFS2)
646 NVIC_ClearPendingIRQ(MFS2_TX_IRQn);
647 NVIC_DisableIRQ(MFS2_TX_IRQn);
650 NVIC_ClearPendingIRQ(MFS2_RX_IRQn);
651 NVIC_DisableIRQ(MFS2_RX_IRQn);
656 #if (PDL_PERIPHERAL_ENABLE_MFS3 == PDL_ON)
657 if (pstcMfs == &
MFS3)
660 NVIC_ClearPendingIRQ(MFS3_TX_IRQn);
661 NVIC_DisableIRQ(MFS3_TX_IRQn);
664 NVIC_ClearPendingIRQ(MFS3_RX_IRQn);
665 NVIC_DisableIRQ(MFS3_RX_IRQn);
670 #if (PDL_PERIPHERAL_ENABLE_MFS4 == PDL_ON)
671 if (pstcMfs == &
MFS4)
674 NVIC_ClearPendingIRQ(MFS4_TX_IRQn);
675 NVIC_DisableIRQ(MFS4_TX_IRQn);
678 NVIC_ClearPendingIRQ(MFS4_RX_IRQn);
679 NVIC_DisableIRQ(MFS4_RX_IRQn);
684 #if (PDL_PERIPHERAL_ENABLE_MFS5 == PDL_ON)
685 if (pstcMfs == &
MFS5)
688 NVIC_ClearPendingIRQ(MFS5_TX_IRQn);
689 NVIC_DisableIRQ(MFS5_TX_IRQn);
692 NVIC_ClearPendingIRQ(MFS5_RX_IRQn);
693 NVIC_DisableIRQ(MFS5_RX_IRQn);
698 #if (PDL_PERIPHERAL_ENABLE_MFS6 == PDL_ON)
699 if (pstcMfs == &
MFS6)
702 NVIC_ClearPendingIRQ(MFS6_TX_IRQn);
703 NVIC_DisableIRQ(MFS6_TX_IRQn);
706 NVIC_ClearPendingIRQ(MFS6_RX_IRQn);
707 NVIC_DisableIRQ(MFS6_RX_IRQn);
712 #if (PDL_PERIPHERAL_ENABLE_MFS7 == PDL_ON)
713 if (pstcMfs == &
MFS7)
716 NVIC_ClearPendingIRQ(MFS7_TX_IRQn);
717 NVIC_DisableIRQ(MFS7_TX_IRQn);
720 NVIC_ClearPendingIRQ(MFS7_RX_IRQn);
721 NVIC_DisableIRQ(MFS7_RX_IRQn);
726 #if (PDL_PERIPHERAL_ENABLE_MFS8 == PDL_ON)
727 if (pstcMfs == &
MFS8)
730 NVIC_ClearPendingIRQ(MFS8_TX_IRQn);
731 NVIC_DisableIRQ(MFS8_TX_IRQn);
734 NVIC_ClearPendingIRQ(MFS8_RX_IRQn);
735 NVIC_DisableIRQ(MFS8_RX_IRQn);
740 #if (PDL_PERIPHERAL_ENABLE_MFS9 == PDL_ON)
741 if (pstcMfs == &
MFS9)
744 NVIC_ClearPendingIRQ(MFS9_TX_IRQn);
745 NVIC_DisableIRQ(MFS9_TX_IRQn);
748 NVIC_ClearPendingIRQ(MFS9_RX_IRQn);
749 NVIC_DisableIRQ(MFS9_RX_IRQn);
754 #if (PDL_PERIPHERAL_ENABLE_MFS10 == PDL_ON)
755 if (pstcMfs == &
MFS10)
758 NVIC_ClearPendingIRQ(MFS10_TX_IRQn);
759 NVIC_DisableIRQ(MFS10_TX_IRQn);
762 NVIC_ClearPendingIRQ(MFS10_RX_IRQn);
763 NVIC_DisableIRQ(MFS10_RX_IRQn);
768 #if (PDL_PERIPHERAL_ENABLE_MFS11 == PDL_ON)
769 if (pstcMfs == &
MFS11)
772 NVIC_ClearPendingIRQ(MFS11_TX_IRQn);
773 NVIC_DisableIRQ(MFS11_TX_IRQn);
776 NVIC_ClearPendingIRQ(MFS11_RX_IRQn);
777 NVIC_DisableIRQ(MFS11_RX_IRQn);
782 #if (PDL_PERIPHERAL_ENABLE_MFS12 == PDL_ON)
783 if (pstcMfs == &
MFS12)
786 NVIC_ClearPendingIRQ(MFS12_TX_IRQn);
787 NVIC_DisableIRQ(MFS12_TX_IRQn);
790 NVIC_ClearPendingIRQ(MFS12_RX_IRQn);
791 NVIC_DisableIRQ(MFS12_RX_IRQn);
796 #if (PDL_PERIPHERAL_ENABLE_MFS13 == PDL_ON)
797 if (pstcMfs == &
MFS13)
800 NVIC_ClearPendingIRQ(MFS13_TX_IRQn);
801 NVIC_DisableIRQ(MFS13_TX_IRQn);
804 NVIC_ClearPendingIRQ(MFS13_RX_IRQn);
805 NVIC_DisableIRQ(MFS13_RX_IRQn);
810 #if (PDL_PERIPHERAL_ENABLE_MFS14 == PDL_ON)
811 if (pstcMfs == &
MFS14)
814 NVIC_ClearPendingIRQ(MFS14_TX_IRQn);
815 NVIC_DisableIRQ(MFS14_TX_IRQn);
818 NVIC_ClearPendingIRQ(MFS14_RX_IRQn);
819 NVIC_DisableIRQ(MFS14_RX_IRQn);
824 #if (PDL_PERIPHERAL_ENABLE_MFS15 == PDL_ON)
825 if (pstcMfs == &
MFS15)
828 NVIC_ClearPendingIRQ(MFS15_TX_IRQn);
829 NVIC_DisableIRQ(MFS15_TX_IRQn);
832 NVIC_ClearPendingIRQ(MFS15_RX_IRQn);
833 NVIC_DisableIRQ(MFS15_RX_IRQn);
852 if ((NULL != pstcMfs) && (NULL != pstcMfsInternData))
872 if ((NULL != pstcMfs) && (NULL != pstcMfsInternData))
892 if ((NULL != pstcMfs) && (NULL != pstcMfsInternData))
901 #if (PDL_MFS_USE_HL == PDL_OFF)
924 stc_mfs_smr_field_t stcSMR = { 0 };
925 stc_mfs_scr_field_t stcSCR = { 0 };
926 stc_mfs_escr_field_t stcESCR = { 0 };
930 || (NULL == pstcConfig)
974 stcESCR.ESBL =
FALSE;
978 stcESCR.ESBL =
FALSE;
1025 stcESCR.FLWEN =
TRUE;
1029 stcESCR.FLWEN =
FALSE;
1039 stcESCR.INV =
FALSE;
1043 pstcUart->SCR_f.UPCL =
TRUE;
1048 pstcUart->SMR_f = stcSMR;
1049 pstcUart->SCR_f = stcSCR;
1050 pstcUart->ESCR_f = stcESCR;
1056 #if (PDL_MFS_USE_HL == PDL_OFF)
1080 if (NULL == pstcMfsInternData)
1086 pstcUart->SCR_f.TXE =
FALSE;
1087 pstcUart->SCR_f.RXE =
FALSE;
1102 pstcUart->SSR_f.REC =
TRUE;
1106 pstcUart->ESCR = 0u;
1107 pstcUart->FCR0 = 0u;
1108 pstcUart->FCR1 = 0u;
1111 pstcUart->SCR_f.UPCL =
TRUE;
1126 #if (PDL_MFS_USE_HL == PDL_OFF)
1144 uint32_t u32BaudRate
1148 uint32_t u32ReloadValue;
1150 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
1170 pstcUart->BGR = (uint16_t)(u32ReloadValue &
MFS_BGR_MASK);
1173 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
1181 #if (PDL_MFS_USE_HL == PDL_OFF)
1204 stc_mfs_smr_field_t stcSMR = { 0 };
1205 stc_mfs_scr_field_t stcSCR = { 0 };
1206 stc_mfs_ssr_field_t stcSSR = { 0 };
1207 stc_mfs_escr_field_t stcESCR = { 0 };
1211 || (NULL == pstcConfig)
1350 stcSMR.SCINV =
TRUE;
1354 stcSMR.SCINV =
FALSE;
1362 pstcCsio->SMR_f = stcSMR;
1363 pstcCsio->SCR_f = stcSCR;
1364 pstcCsio->ESCR_f = stcESCR;
1365 pstcCsio->SSR_f = stcSSR;
1371 #if (PDL_MFS_USE_HL == PDL_OFF)
1395 if (NULL == pstcMfsInternData)
1402 pstcCsio->SCR_f.TXE =
FALSE;
1403 pstcCsio->SCR_f.RXE =
FALSE;
1418 pstcCsio->SSR_f.REC =
TRUE;
1422 pstcCsio->ESCR = 0u;
1423 pstcCsio->FCR0 = 0u;
1424 pstcCsio->FCR1 = 0u;
1425 pstcCsio->SACSR = 0u;
1426 pstcCsio->STMCR = 0u;
1427 pstcCsio->SCSCR = 0u;
1428 pstcCsio->TBYTE0 = 0u;
1443 #if (PDL_MFS_USE_HL == PDL_OFF)
1466 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
1476 if (
FALSE == bEnable)
1478 pstcCsio->SMR_f.SCKE =
FALSE;
1483 pstcCsio->SMR_f.SCKE =
TRUE;
1487 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
1495 #if (PDL_MFS_USE_HL == PDL_OFF)
1513 uint32_t u32ReadData;
1515 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
1525 u32ReadData = pstcCsio->RDR32;
1526 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
1530 return (u32ReadData);
1534 #if (PDL_MFS_USE_HL == PDL_OFF)
1556 const uint32_t u32Data
1561 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
1571 pstcCsio->TDR32 = (uint32_t)u32Data;
1574 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
1582 #if (PDL_MFS_USE_HL == PDL_OFF)
1605 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
1615 if (
FALSE == bEnable)
1617 pstcCsio->SACSR_f.TBEEN =
FALSE;
1622 pstcCsio->SACSR_f.TBEEN =
TRUE;
1626 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
1634 #if (PDL_MFS_USE_HL == PDL_OFF)
1657 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
1667 if (
FALSE == bEnable)
1669 pstcCsio->SACSR_f.CSEIE =
FALSE;
1674 pstcCsio->SACSR_f.CSEIE =
TRUE;
1678 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
1686 #if (PDL_MFS_USE_HL == PDL_OFF)
1700 uint16_t u16StatusMask
1705 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
1715 u16Status = pstcCsio->SACSR & u16StatusMask;
1716 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
1724 #if (PDL_MFS_USE_HL == PDL_OFF)
1743 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
1753 pstcCsio->SACSR_f.CSE =
FALSE;
1756 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
1764 #if (PDL_MFS_USE_HL == PDL_OFF)
1783 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
1793 pstcCsio->SACSR_f.TINT =
FALSE;
1796 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
1804 #if (PDL_MFS_USE_HL == PDL_OFF)
1827 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
1837 if (
FALSE == bEnable)
1839 pstcCsio->SACSR_f.TINTE =
FALSE;
1844 pstcCsio->SACSR_f.TINTE =
TRUE;
1848 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
1856 #if (PDL_MFS_USE_HL == PDL_OFF)
1879 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
1889 if (
FALSE == bEnable)
1891 pstcCsio->SACSR_f.TSYNE =
FALSE;
1896 pstcCsio->SACSR_f.TSYNE =
TRUE;
1900 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
1908 #if (PDL_MFS_USE_HL == PDL_OFF)
1930 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
1939 pstcCsio->SACSR_f.TDIV = u8Prescale;
1942 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
1950 #if (PDL_MFS_USE_HL == PDL_OFF)
1973 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
1983 if (
FALSE == bEnable)
1985 pstcCsio->SACSR_f.TMRE =
FALSE;
1990 pstcCsio->SACSR_f.TMRE =
TRUE;
1994 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2002 #if (PDL_MFS_USE_HL == PDL_OFF)
2015 uint16_t u16SerialTimer;
2017 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2021 u16SerialTimer = 0u;
2027 u16SerialTimer = pstcCsio->STMR;
2028 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2032 return (u16SerialTimer);
2036 #if (PDL_MFS_USE_HL == PDL_OFF)
2053 uint16_t u16CompareValue
2058 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2068 pstcCsio->STMCR = u16CompareValue;
2071 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2079 #if (PDL_MFS_USE_HL == PDL_OFF)
2102 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2114 pstcCsio->SCSCR_f.SCAM =
FALSE;
2119 pstcCsio->SCSCR_f.SCAM =
TRUE;
2123 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2131 #if (PDL_MFS_USE_HL == PDL_OFF)
2153 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2162 pstcCsio->SCSCR_f.CDIV = u8Prescale;
2165 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2173 #if (PDL_MFS_USE_HL == PDL_OFF)
2196 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2206 if (
FALSE == bLevel)
2208 pstcCsio->SCSCR_f.CSLVL =
FALSE;
2213 pstcCsio->SCSCR_f.CSLVL =
TRUE;
2217 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2225 #if (PDL_MFS_USE_HL == PDL_OFF)
2248 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2258 if (
FALSE == bEnable)
2260 pstcCsio->SCSCR_f.CSEN0 =
FALSE;
2265 pstcCsio->SCSCR_f.CSEN0 =
TRUE;
2269 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2277 #if (PDL_MFS_USE_HL == PDL_OFF)
2300 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2310 if (
FALSE == bEnable)
2312 pstcCsio->SCSCR_f.CSOE =
FALSE;
2317 pstcCsio->SCSCR_f.CSOE =
TRUE;
2321 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2329 #if (PDL_MFS_USE_HL == PDL_OFF)
2351 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2354 || (NULL == pstcCsTimingCfg)
2370 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2378 #if (PDL_MFS_USE_HL == PDL_OFF)
2400 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2410 pstcCsio->TBYTE0 = u8TxBytes;
2413 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2421 #if (PDL_MFS_USE_HL == PDL_OFF)
2439 uint32_t u32BaudRate
2443 uint32_t u32ReloadValue;
2445 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2465 pstcCsio->BGR = (uint16_t)(u32ReloadValue &
MFS_BGR_MASK);
2469 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2477 #if (PDL_MFS_USE_HL == PDL_OFF)
2500 stc_mfs_smr_field_t stcSMR = { 0 };
2501 stc_mfs_i2c_ibcr_field_t stcIBCR = { 0 };
2502 stc_mfs_i2c_isba_field_t stcISBA = { 0 };
2503 stc_mfs_i2c_ismk_field_t stcISMK = { 0 };
2504 uint8_t u8NFCR = 0u;
2508 || (NULL == pstcConfig)
2564 FM4_GPIO->EPFR16_f.SFMPAC =
FALSE;
2568 FM4_GPIO->EPFR16_f.SFMPBC =
FALSE;
2575 FM4_GPIO->EPFR16_f.SFMPAC =
TRUE;
2579 FM4_GPIO->EPFR16_f.SFMPBC =
TRUE;
2588 stcIBCR.ACKE =
TRUE;
2596 stcISBA.SAEN =
TRUE;
2605 pstcI2c->SMR_f = stcSMR;
2614 pstcI2c->NFCR = u8NFCR;
2615 pstcI2c->IBCR_f = stcIBCR;
2616 pstcI2c->ISBA_f = stcISBA;
2617 pstcI2c->ISMK_f = stcISMK;
2623 #if (PDL_MFS_USE_HL == PDL_OFF)
2647 if (NULL == pstcMfsInternData)
2654 pstcI2c->ISMK_f.EN =
FALSE;
2666 pstcI2c->SSR_f.REC =
TRUE;
2688 #if (PDL_MFS_USE_HL == PDL_OFF)
2711 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2721 if (
FALSE == bEnable)
2723 pstcI2c->SMR_f.TIE =
FALSE;
2728 pstcI2c->SMR_f.TIE =
TRUE;
2732 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2740 #if (PDL_MFS_USE_HL == PDL_OFF)
2763 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2773 if (
FALSE == bEnable)
2775 pstcI2c->SMR_f.RIE =
FALSE;
2780 pstcI2c->SMR_f.RIE =
TRUE;
2784 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2792 #if (PDL_MFS_USE_HL == PDL_OFF)
2815 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2825 if (
FALSE == bEnable)
2827 pstcI2c->IBCR_f.ACKE =
FALSE;
2832 pstcI2c->IBCR_f.ACKE =
TRUE;
2836 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2844 #if (PDL_MFS_USE_HL == PDL_OFF)
2861 uint8_t u8WaitSelect
2866 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2878 pstcI2c->IBCR_f.WSEL =
TRUE;
2883 pstcI2c->IBCR_f.WSEL =
FALSE;
2887 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2895 #if (PDL_MFS_USE_HL == PDL_OFF)
2918 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2928 if (
FALSE == bEnable)
2930 pstcI2c->IBCR_f.CNDE =
FALSE;
2935 pstcI2c->IBCR_f.CNDE =
TRUE;
2939 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2947 #if (PDL_MFS_USE_HL == PDL_OFF)
2970 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2980 if (
FALSE == bEnable)
2982 pstcI2c->IBCR_f.INTE =
FALSE;
2987 pstcI2c->IBCR_f.INTE =
TRUE;
2991 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
2999 #if (PDL_MFS_USE_HL == PDL_OFF)
3014 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3020 if(
TRUE == pstcI2c->IBCR_f.BER)
3024 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3028 return (bErrStatus);
3032 #if (PDL_MFS_USE_HL == PDL_OFF)
3047 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3053 if(
TRUE == pstcI2c->IBCR_f.INT)
3057 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3061 return (bIntStatus);
3065 #if (PDL_MFS_USE_HL == PDL_OFF)
3084 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3094 pstcI2c->IBCR_f.INT =
FALSE;
3097 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3105 #if (PDL_MFS_USE_HL == PDL_OFF)
3126 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3136 pstcI2c->SSR_f.TSET =
FALSE;
3139 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3147 #if (PDL_MFS_USE_HL == PDL_OFF)
3170 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3180 if (
FALSE == bEnable)
3182 pstcI2c->SSR_f.DMA =
FALSE;
3187 pstcI2c->SSR_f.DMA =
TRUE;
3191 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3199 #if (PDL_MFS_USE_HL == PDL_OFF)
3222 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3234 pstcI2c->NFCR = u8NzFilter;
3237 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3245 #if (PDL_MFS_USE_HL == PDL_OFF)
3269 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3279 if (
FALSE == bLevel)
3281 pstcI2c->EIBCR_f.SDAC =
FALSE;
3286 pstcI2c->EIBCR_f.SDAC =
TRUE;
3290 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3298 #if (PDL_MFS_USE_HL == PDL_OFF)
3322 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3334 pstcI2c->EIBCR_f.SCLC =
FALSE;
3339 pstcI2c->EIBCR_f.SCLC =
TRUE;
3343 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3351 #if (PDL_MFS_USE_HL == PDL_OFF)
3374 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3384 if (
FALSE == bEnable)
3386 pstcI2c->EIBCR_f.SOCE =
FALSE;
3391 pstcI2c->EIBCR_f.SOCE =
TRUE;
3395 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3403 #if (PDL_MFS_USE_HL == PDL_OFF)
3426 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3436 if (
FALSE == bEnable)
3438 pstcI2c->EIBCR_f.BEC =
FALSE;
3443 pstcI2c->EIBCR_f.BEC =
TRUE;
3447 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3455 #if (PDL_MFS_USE_HL == PDL_OFF)
3479 stc_mfs_i2c_ismk_field_t stcISMK;
3481 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3491 if (
FALSE == bEnable)
3505 pstcI2c->ISMK_f = stcISMK;
3508 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3516 #if (PDL_MFS_USE_HL == PDL_OFF)
3540 stc_mfs_i2c_isba_field_t stcISBA;
3542 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3552 if (
FALSE == bEnable)
3554 stcISBA.SAEN =
FALSE;
3560 stcISBA.SAEN =
TRUE;
3566 pstcI2c->ISBA_f = stcISBA;
3569 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3577 #if (PDL_MFS_USE_HL == PDL_OFF)
3595 uint32_t u32BaudRate
3599 uint32_t u32ReloadValue;
3601 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3615 if (0u == u32ReloadValue)
3621 pstcI2c->BGR = (uint16_t)(u32ReloadValue &
MFS_BGR_MASK);
3622 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3630 #if (PDL_MFS_USE_HL == PDL_OFF)
3653 stc_mfs_smr_field_t stcSMR = { 0 };
3654 stc_mfs_scr_field_t stcSCR = { 0 };
3655 stc_mfs_escr_field_t stcESCR = { 0 };
3659 || (NULL == pstcConfig)
3672 pstcLin->SCR_f.UPCL =
TRUE;
3703 stcESCR.ESBL =
FALSE;
3707 stcESCR.ESBL =
FALSE;
3711 stcESCR.ESBL =
TRUE;
3715 stcESCR.ESBL =
TRUE;
3761 stcESCR.LBIE =
TRUE;
3765 stcESCR.LBIE =
FALSE;
3769 pstcLin->SCR_f.UPCL =
TRUE;
3775 pstcLin->SMR_f = stcSMR;
3776 pstcLin->SCR_f = stcSCR;
3777 pstcLin->ESCR_f = stcESCR;
3783 #if (PDL_MFS_USE_HL == PDL_OFF)
3809 #if (PDL_MFS_USE_HL == PDL_OFF)
3833 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3843 pstcLin->SCR_f.LBR =
TRUE;
3846 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3854 #if (PDL_MFS_USE_HL == PDL_OFF)
3872 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3881 pstcLin->SSR_f.LBD =
FALSE;
3884 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3892 #if (PDL_MFS_USE_HL == PDL_OFF)
3915 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3925 if (
FALSE == bEnable)
3927 pstcLin->ESCR_f.LBIE =
FALSE;
3932 pstcLin->ESCR_f.LBIE =
TRUE;
3936 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3944 #if (PDL_MFS_USE_HL == PDL_OFF)
3965 uint8_t u8DelimiterLen
3968 stc_mfs_escr_field_t stcESCR;
3971 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
3982 stcESCR = pstcLin->ESCR_f;
4004 switch (u8DelimiterLen)
4025 pstcLin->ESCR_f = stcESCR;
4027 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4035 #if (PDL_MFS_USE_HL == PDL_OFF)
4053 uint32_t u32BaudRate
4061 #if (PDL_MFS_USE_HL == PDL_OFF)
4084 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4094 if (
FALSE == bEnable)
4096 pstcMfs->SMR_f.SOE =
FALSE;
4101 pstcMfs->SMR_f.SOE =
TRUE;
4105 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4113 #if (PDL_MFS_USE_HL == PDL_OFF)
4136 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4146 if (
FALSE == bEnable)
4148 pstcMfs->SMR_f.WUCR =
FALSE;
4153 pstcMfs->SMR_f.WUCR =
TRUE;
4157 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4165 #if (PDL_MFS_USE_HL == PDL_OFF)
4184 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4194 pstcMfs->SCR_f.UPCL =
TRUE;
4197 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4205 #if (PDL_MFS_USE_HL == PDL_OFF)
4228 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4238 if (
FALSE == bEnable)
4240 pstcMfs->SCR_f.RIE =
FALSE;
4245 pstcMfs->SCR_f.RIE =
TRUE;
4249 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4257 #if (PDL_MFS_USE_HL == PDL_OFF)
4280 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4290 if (
FALSE == bEnable)
4292 pstcMfs->SCR_f.TIE =
FALSE;
4297 pstcMfs->SCR_f.TIE =
TRUE;
4301 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4309 #if (PDL_MFS_USE_HL == PDL_OFF)
4332 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4342 if (
FALSE == bEnable)
4344 pstcMfs->SCR_f.TBIE =
FALSE;
4349 pstcMfs->SCR_f.TBIE =
TRUE;
4353 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4361 #if (PDL_MFS_USE_HL == PDL_OFF)
4384 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4394 if (
FALSE == bEnable)
4396 pstcMfs->FCR1_f.FTIE =
FALSE;
4401 pstcMfs->FCR1_f.FTIE =
TRUE;
4405 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4413 #if (PDL_MFS_USE_HL == PDL_OFF)
4436 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4446 if (
FALSE == bEnable)
4448 pstcMfs->SCR_f.RXE =
FALSE;
4453 pstcMfs->SCR_f.RXE =
TRUE;
4457 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4465 #if (PDL_MFS_USE_HL == PDL_OFF)
4488 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4498 if (
FALSE == bEnable)
4500 pstcMfs->SCR_f.TXE =
FALSE;
4505 pstcMfs->SCR_f.TXE =
TRUE;
4509 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4517 #if (PDL_MFS_USE_HL == PDL_OFF)
4530 uint8_t u8StatusMask
4535 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4545 u8Status = pstcMfs->SSR & u8StatusMask;
4546 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4554 #if (PDL_MFS_USE_HL == PDL_OFF)
4573 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4582 pstcMfs->SSR_f.REC =
TRUE;
4585 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4593 #if (PDL_MFS_USE_HL == PDL_OFF)
4611 uint16_t u16ReadData;
4613 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4623 u16ReadData = pstcMfs->RDR;
4624 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4628 return (u16ReadData);
4632 #if (PDL_MFS_USE_HL == PDL_OFF)
4655 const uint16_t u16Data
4660 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4670 pstcMfs->TDR = u16Data;
4673 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4681 #if (PDL_MFS_USE_HL == PDL_OFF)
4706 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4709 || (NULL == pstcFifoConfig)
4723 pstcMfs->FCR1_f.FSEL =
FALSE;
4726 pstcMfs->FCR1_f.FSEL =
TRUE;
4739 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4747 #if (PDL_MFS_USE_HL == PDL_OFF)
4767 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4773 if(
TRUE == pstcMfs->FCR1_f.FDRQ)
4777 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4785 #if (PDL_MFS_USE_HL == PDL_OFF)
4804 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4814 pstcMfs->FCR1_f.FDRQ =
FALSE;
4817 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4825 #if (PDL_MFS_USE_HL == PDL_OFF)
4843 uint8_t u8FifoNumber
4848 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4860 switch (u8FifoNumber)
4863 pstcMfs->FCR0_f.FCL1 =
TRUE;
4866 pstcMfs->FCR0_f.FCL2 =
TRUE;
4872 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4880 #if (PDL_MFS_USE_HL == PDL_OFF)
4900 uint8_t u8FifoNumber,
4906 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4917 switch (u8FifoNumber)
4921 if (
FALSE == bEnable)
4923 pstcMfs->FCR0_f.FE1 =
FALSE;
4928 pstcMfs->FCR0_f.FE1 =
TRUE;
4933 if (
FALSE == bEnable)
4935 pstcMfs->FCR0_f.FE2 =
FALSE;
4940 pstcMfs->FCR0_f.FE2 =
TRUE;
4947 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4955 #if (PDL_MFS_USE_HL == PDL_OFF)
4969 uint8_t u8FifoNumber
4972 uint8_t u8FifoBytes;
4974 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
4985 switch (u8FifoNumber)
4988 u8FifoBytes = pstcMfs->FBYTE1;
4991 u8FifoBytes = pstcMfs->FBYTE2;
4998 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5002 return(u8FifoBytes);
5016 uint32_t u32BusClock;
5022 u32BusClock = __CLKHC;
5025 u32BusClock = __CLKMO;
5032 u32BusClock = __CLKLC;
5035 u32BusClock = __CLKSO;
5090 return (u32BusClock);
5107 uint32_t u32ReloadValue;
5110 if (0u == u32BaudRate)
5112 u32ReloadValue = 0u;
5119 u32ReloadValue /= u32BaudRate;
5123 return (u32ReloadValue);
5138 uint32_t u32ReloadValue;
5141 if (0u == u32BaudRate)
5143 u32ReloadValue = 0u;
5150 u32ReloadValue /= u32BaudRate;
5154 return (u32ReloadValue);
5157 #if (PDL_MFS_USE_HL == PDL_OFF)
5179 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5189 pstcMfs->SMR = u8SMR;
5192 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5200 #if (PDL_MFS_USE_HL == PDL_OFF)
5215 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5225 u8Reg = pstcMfs->SMR;
5226 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5234 #if (PDL_MFS_USE_HL == PDL_OFF)
5256 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5266 pstcMfs->SCR = u8SCR;
5269 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5277 #if (PDL_MFS_USE_HL == PDL_OFF)
5292 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5302 u8Reg = pstcMfs->SCR;
5303 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5311 #if (PDL_MFS_USE_HL == PDL_OFF)
5333 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5343 pstcMfs->ESCR = u8ESCR;
5346 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5354 #if (PDL_MFS_USE_HL == PDL_OFF)
5369 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5379 u8Reg = pstcMfs->ESCR;
5380 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5388 #if (PDL_MFS_USE_HL == PDL_OFF)
5410 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5420 pstcMfs->BGR = u16BGR;
5423 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5431 #if (PDL_MFS_USE_HL == PDL_OFF)
5446 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5456 u16Reg = pstcMfs->BGR;
5457 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5465 #if (PDL_MFS_USE_HL == PDL_OFF)
5487 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5497 pstcMfs->FCR1 = u8FCR1;
5500 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5508 #if (PDL_MFS_USE_HL == PDL_OFF)
5523 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5533 u8Reg = pstcMfs->FCR1;
5534 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5542 #if (PDL_MFS_USE_HL == PDL_OFF)
5564 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5574 pstcMfs->FCR0 = u8FCR0;
5577 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5585 #if (PDL_MFS_USE_HL == PDL_OFF)
5600 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5610 u8Reg = pstcMfs->FCR0;
5611 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5619 #if (PDL_MFS_USE_HL == PDL_OFF)
5641 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5651 pstcMfs->SCSTR10 = u16SCSTR10;
5654 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5662 #if (PDL_MFS_USE_HL == PDL_OFF)
5677 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5687 u16Reg = pstcMfs->SCSTR10;
5688 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5696 #if (PDL_MFS_USE_HL == PDL_OFF)
5718 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5728 pstcMfs->SCSTR32 = u16SCSTR32;
5731 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5739 #if (PDL_MFS_USE_HL == PDL_OFF)
5754 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5764 u16Reg = pstcMfs->SCSTR32;
5765 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5773 #if (PDL_MFS_USE_HL == PDL_OFF)
5795 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5805 pstcMfs->SACSR = u16SACSR;
5808 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5816 #if (PDL_MFS_USE_HL == PDL_OFF)
5831 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5841 u16Reg = pstcMfs->SACSR;
5842 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5850 #if (PDL_MFS_USE_HL == PDL_OFF)
5865 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5875 u16Reg = pstcMfs->STMCR;
5876 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5884 #if (PDL_MFS_USE_HL == PDL_OFF)
5906 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5916 pstcMfs->SCSCR = u16SCSCR;
5919 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5927 #if (PDL_MFS_USE_HL == PDL_OFF)
5943 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5953 u16Reg = pstcMfs->SCSCR;
5954 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5962 #if (PDL_MFS_USE_HL == PDL_OFF)
5984 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
5994 pstcMfs->TBYTE0 = u8TBYTE0;
5997 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
6005 #if (PDL_MFS_USE_HL == PDL_OFF)
6025 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
6035 u8Reg = pstcMfs->TBYTE0;
6036 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
6044 #if (PDL_MFS_USE_HL == PDL_OFF)
6066 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
6076 pstcMfs->ISBA = u8ISBA;
6079 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
6087 #if (PDL_MFS_USE_HL == PDL_OFF)
6102 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
6112 u8Reg = pstcMfs->ISBA;
6113 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
6121 #if (PDL_MFS_USE_HL == PDL_OFF)
6143 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
6153 pstcMfs->ISMK = u8ISMK;
6156 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
6164 #if (PDL_MFS_USE_HL == PDL_OFF)
6179 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
6189 u8Reg = pstcMfs->ISMK;
6190 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
6198 #if (PDL_MFS_USE_HL == PDL_OFF)
6213 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
6223 u8Reg = pstcMfs->NFCR;
6224 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
6232 #if (PDL_MFS_USE_HL == PDL_OFF)
6254 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
6267 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
6275 #if (PDL_MFS_USE_HL == PDL_OFF)
6290 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
6300 u8Reg = pstcMfs->EIBCR;
6301 #if (PDL_MFS_NO_PARAM_CHK == PDL_OFF)
6335 if (NULL == pstcMfsInternData)
6374 if (NULL == pstcMfsInternData)
6413 if (NULL == pstcMfsInternData)
6452 if (NULL == pstcMfsInternData)