RobotHardware-UESTC/Hardware/银星机器人底盘/PiRobot-YH_Firmware v1.0/STM32/BSPLIB/usart.h

26 lines
630 B
C
Raw Normal View History

2024-01-20 13:19:09 +08:00
#ifndef USART_H
#define USART_H
#ifdef __cplusplus
extern "C" {
#endif
#include "stm32f10x.h"
#include "stdarg.h"
#include "stdio.h"
//Initilaize the serial, First Parameter:USART1,USART2,USART3; 2nd Para:bits rate; 3rd: IO reuse
void PB_USART_Init(uint8_t USART_Channel ,unsigned int BaudRate,unsigned char GPIO_AF);
void PB_USART_Put_Char(uint8_t USART_Channel , unsigned char Tx_Byte); //USARTx to print 1 byte
2024-01-23 15:06:39 +08:00
void USART_printf(USART_TypeDef* USARTx, uint8_t *Data, ...); //format output as printf in C standard library
2024-01-20 13:19:09 +08:00
//int fputc(int ch, FILE *f);
#ifdef __cplusplus
}
#endif
#endif // #ifndef USART_H