Files
433_STM32/Core/Inc/uart2_print.h

100 lines
2.3 KiB
C
Raw Normal View History

/**
******************************************************************************
* @file uart2_print.h
* @brief UART2调试打印模块头文件
* @author Application Layer
* @version 1.0
******************************************************************************
* @attention
*
* printf风格的格式化输出
*
******************************************************************************
*/
#ifndef __UART2_PRINT_H
#define __UART2_PRINT_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include <stdarg.h>
#include <stdbool.h>
#define UART2_TX_BUFFER_SIZE 256
/**
* @brief UART2打印模块
* @note
* @param
* @retval
*/
void UART2_Print_Init(void);
/**
* @brief UART2
* @note
* @param data:
* @param len:
* @retval
*/
void UART2_Print_Send(const uint8_t *data, uint16_t len);
/**
* @brief UART2
* @note
* @param str:
* @retval
*/
void UART2_Print_String(const char *str);
/**
* @brief UART2
* @note printf风格的格式化输出
* @param fmt:
* @param ...:
* @retval
*/
void UART2_Print_Printf(const char *fmt, ...);
/**
* @brief UART2打印任务处理函数
* @note
*
* @param
* @retval
*/
void UART2_Print_Task(void);
/**
* @brief UART2是否正在发送
* @note
* @param
* @retval true: , false:
*/
bool UART2_Print_IsBusy(void);
/**
* @brief
* @note
* @param
* @retval
*/
uint16_t UART2_Print_Available(void);
/**
* @brief UART2发送完成中断回调
* @note HAL库调用
* @param huart: UART句柄指针
* @retval
*/
void UART2_Print_TxCpltCallback(void);
#ifdef __cplusplus
}
#endif
#endif