Lines Matching refs:sc

33 void SCUART_Close(SC_T* sc)  in SCUART_Close()  argument
35 sc->INTEN = 0UL; in SCUART_Close()
36 sc->UARTCTL = 0UL; in SCUART_Close()
37 sc->CTL = 0UL; in SCUART_Close()
48 static uint32_t SCUART_GetClock(SC_T *sc) in SCUART_GetClock() argument
53 if(sc == SC0) in SCUART_GetClock()
59 else if(sc == SC1) in SCUART_GetClock()
65 else if(sc == SC2) in SCUART_GetClock()
128 uint32_t SCUART_Open(SC_T* sc, uint32_t u32Baudrate) in SCUART_Open() argument
130 uint32_t u32ClkFreq = SCUART_GetClock(sc), u32Div; in SCUART_Open()
135 sc->CTL = SC_CTL_SCEN_Msk | SC_CTL_NSB_Msk; /* Enable smartcard interface and stop bit = 1 */ in SCUART_Open()
136sc->UARTCTL = SCUART_CHAR_LEN_8 | SCUART_PARITY_NONE | SC_UARTCTL_UARTEN_Msk; /* Enable UART mode,… in SCUART_Open()
137 sc->ETUCTL = u32Div; in SCUART_Open()
155 uint32_t SCUART_Read(SC_T* sc, uint8_t pu8RxBuf[], uint32_t u32ReadBytes) in SCUART_Read() argument
161 if(SCUART_GET_RX_EMPTY(sc) == SC_STATUS_RXEMPTY_Msk) in SCUART_Read()
167 pu8RxBuf[u32Count] = (uint8_t)SCUART_READ(sc); in SCUART_Read()
199 uint32_t SCUART_SetLineConfig(SC_T* sc, uint32_t u32Baudrate, uint32_t u32DataWidth, uint32_t u32Pa… in SCUART_SetLineConfig() argument
201 uint32_t u32ClkFreq = SCUART_GetClock(sc), u32Div; in SCUART_SetLineConfig()
206 u32Div = sc->ETUCTL & SC_ETUCTL_ETURDIV_Msk; in SCUART_SetLineConfig()
212 sc->ETUCTL = u32Div; in SCUART_SetLineConfig()
215 sc->CTL = u32StopBits | SC_CTL_SCEN_Msk; /* Set stop bit */ in SCUART_SetLineConfig()
216sc->UARTCTL = u32Parity | u32DataWidth | SC_UARTCTL_UARTEN_Msk; /* Set character width and parity… in SCUART_SetLineConfig()
234 void SCUART_SetTimeoutCnt(SC_T* sc, uint32_t u32TOC) in SCUART_SetTimeoutCnt() argument
236 sc->RXTOUT = u32TOC; in SCUART_SetTimeoutCnt()
250 uint32_t SCUART_Write(SC_T* sc, uint8_t pu8TxBuf[], uint32_t u32WriteBytes) in SCUART_Write() argument
254 uint32_t u32Delay = (SystemCoreClock / SCUART_GetClock(sc)) * sc->ETUCTL * 12, i; in SCUART_Write()
260 while(SCUART_GET_TX_FULL(sc)) in SCUART_Write()
266 sc->DAT = pu8TxBuf[u32Count]; in SCUART_Write()