/* Initializes the UARTx peripheral */ void Chip_UART_Init(LPC_USART_Type *UARTx) { UART_ID_Type UARTPort = Chip_UART_Get_UARTNum(UARTx); /* Enable UART clocking. UART base clock(s) must already be enabled */ Chip_Clock_EnableOpts(Chip_UART_DetermineClk(UARTx), true, true, 1); IP_UART_Init(UARTx, UARTPort); }
/* De-initializes the UARTx peripheral */ void Chip_UART_DeInit(LPC_USART_Type *UARTx) { UART_ID_Type UARTPort = Chip_UART_Get_UARTNum(UARTx); IP_UART_DeInit(UARTx, UARTPort); /* Disable UART clocking */ Chip_Clock_Disable(Chip_UART_DetermineClk(UARTx)); }
/* De-initializes the pUART peripheral */ void Chip_UART_DeInit(LPC_USART_T *pUART) { IP_UART_ID_T UARTPort = Chip_UART_Get_UARTNum(pUART); IP_UART_DeInit(pUART, UARTPort); /* Disable UART clocking */ Chip_Clock_DisablePeriphClock(Chip_UART_DetermineClk(pUART)); }
/* Initializes the pUART peripheral */ void Chip_UART_Init(LPC_USART_T *pUART) { IP_UART_ID_T UARTPort = Chip_UART_Get_UARTNum(pUART); /* Enable UART clocking. UART base clock(s) must already be enabled */ Chip_Clock_EnablePeriphClock(Chip_UART_DetermineClk(pUART)); IP_UART_Init(pUART, UARTPort); }
/* Enable/Disable transmission on UART TxD pin */ void Chip_UART_TxCmd(LPC_USART_Type *UARTx, FunctionalState NewState) { UART_ID_Type UARTPort = Chip_UART_Get_UARTNum(UARTx); IP_UART_TxCmd(UARTx, UARTPort, NewState); }
/* Enable/Disable transmission on UART TxD pin */ void Chip_UART_TxCmd(LPC_USART_T *pUART, FunctionalState NewState) { IP_UART_ID_T UARTPort = Chip_UART_Get_UARTNum(pUART); IP_UART_TxCmd(pUART, UARTPort, NewState); }