usart.h

来自「学习stm32定时器」· C头文件 代码 · 共 42 行

H
42
字号
/******************** (C) COPYRIGHT 2013 彭康 **************************
 * 文件名  :usart.h
 * 描述    :用3.5.0版本建的工程         
 * 实验平台:野火STM32开发板
 * 库版本  :ST3.5.0
 *
 * 作者    :彭康
**********************************************************************************/
#ifndef __USART_H
#define __USART_H


/* Includes ------------------------------------------------------------------*/
#include "stm32f10x.h"
#include <stdio.h>

/* Private typedef -----------------------------------------------------------*/
typedef enum { FAILED = 0, PASSED = !FAILED} TestStatus;

/* Private define ------------------------------------------------------------*/
#define TxBufferSize1   (countof(TxBuffer1) - 1)
#define TxBufferSize2   (countof(TxBuffer2) - 1)

/* Private macro -------------------------------------------------------------*/
#define countof(a)   (sizeof(a) / sizeof(*(a)))

/* Private variables ---------------------------------------------------------*/


/* Private function prototypes -----------------------------------------------*/
void Usart_RCC_Configuration(void);
void Usart_GPIO_Configuration(void);
void Usart_Configuration(void);
int fputc(int ch, FILE *f);
void USART1_printf(USART_TypeDef* USARTx, uint8_t *Data,...);

#endif

/******************* (C) COPYRIGHT 2013 彭康 *****END OF FILE************/


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?