You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

47 lines
1.0 KiB

/**
******************************************************************************
* @copyright Copyright (C), 2016-2022, ConvenientPower. Co., Ltd.
* @file comp_uart.h
* @version 1.0
* @author CPS SW Team
* @date 2022-10-21
* @brief Header file of COMP_UART_H module.
******************************************************************************
*/
#ifndef _COMP_UART_H_
#define _COMP_UART_H_
#include "core_comm.h"
#include "core_comm.h"
#include <stdarg.h>
#include <stdint.h>
#include "drv_uart.h"
#define BAUD_115200 115200
#define BAUD_256000 256000
typedef struct fmt_buff_s
{
char *buffer, *pbuffer;
unsigned int buffer_len;
} fmt_buff_s;
/*
* @brief 串口打印初始化
* @param pin_sel(0:GP1,1:cc2_1)
* @param baud_rate
* @note
* @retval null
*/
void comp_uart2_init(uint8_t pin_sel, uint32_t baud_rate);
/*
* @brief 重写的printf函数
* @param *fmt
* @param ....
* @note
* @retval 打印的数据长度
*/
int comp_uart2_sync_print(const char *fmt, ...);
#endif