IO为PD2 和PD3 如何进行串口修改,void UART0_Init(){
/* Set GPB multi-function pins to UART0 RXD and TXD */
// SYS->GPB_MFPH &= ~(SYS_GPB_MFPH_PB12MFP_Msk | SYS_GPB_MFPH_PB13MFP_Msk);
// SYS->GPB_MFPH |= (SYS_GPB_MFPH_PB12MFP_UART0_RXD | SYS_GPB_MFPH_PB13MFP_UART0_TXD);
//
// /* Configure UART0 and set UART0 baud rate */
// UART_Open(UART0, 115200);
SYS->GPB_MFPH &= ~(SYS_GPD_MFPL_PD2MFP_Msk | SYS_GPD_MFPL_PD3MFP_Msk );
SYS->GPB_MFPH |= (SYS_GPD_MFPL_PD2MFP_UART0_RXD | SYS_GPD_MFPL_PD3MFP_UART0_TXD );
//
// /* Configure UART0 and set UART0 baud rate */
UART_Open(UART0, 115200);
}
|