mirror of
https://gitee.com/moluo-tech/CodeBrick.git
synced 2025-02-06 04:48:22 +08:00
增加串口初始化操作
This commit is contained in:
parent
6bb9546232
commit
92fce520cb
@ -38,6 +38,8 @@ static void uart_init(int baudrate)
|
||||
ring_buf_init(&rbsend, txbuf, sizeof(txbuf));/*<2A><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD> */
|
||||
ring_buf_init(&rbrecv, rxbuf, sizeof(rxbuf));
|
||||
|
||||
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA , ENABLE);
|
||||
|
||||
GPIO_PinAFConfig(GPIOA, GPIO_PinSource9, GPIO_AF_USART1);
|
||||
GPIO_PinAFConfig(GPIOA, GPIO_PinSource10, GPIO_AF_USART1);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user