16 lines
407 B
C
16 lines
407 B
C
#ifndef DRIVER_UART_H
|
|
#define DRIVER_UART_H
|
|
|
|
#include "stm32f10x.h"
|
|
|
|
typedef struct {
|
|
USART_TypeDef *UART;
|
|
uint32_t baudrate;
|
|
} MyUART_Struct_TypeDef;
|
|
|
|
void MyUART_Init(MyUART_Struct_TypeDef *UART);
|
|
void MyUART_SendByte(MyUART_Struct_TypeDef *UART, uint8_t data);
|
|
uint8_t MyUART_ReceiveByte(MyUART_Struct_TypeDef *UART);
|
|
void MyUART_SendString(MyUART_Struct_TypeDef *UART, const char *str);
|
|
|
|
#endif
|