Serial port (Usart)

method

uart_init(u32 bound)

Initialized serial port usart1

parametertypeAnnotation
boundu32Baud rate (Commonly used: 9600/115200)

USART1_IRQHandler()

USART1 interrupt processing function

Notice!

We rewritten the Printf () method for serial port debugging output. This method is more convenient than the subsequent sending function

Please use Printf () as the output function first

USART1_Send_U8(uint8_t ch)

Send characters

parametertypeAnnotation
chuint8_tSend character

USART1_Send_ArrayU8(uint8_t *BufferPtr, uint16_t Length)

parametertypeAnnotation
BufferPtruint8_tString pointer
Lengthuint16_tString length