4G_module/custom/custom_main/inc/app_uart.h

33 lines
887 B
C

/*********************************************************
* @file cm_demo_uart.h
* @brief ML302 OpenCPU main header file
* Copyright (c) 2019 China Mobile IOT.
* All rights reserved.
* created by CaoChi 2020/12/10
********************************************************/
#ifndef __CM_UART_DEMO_H__
#define __CM_UART_DEMO_H__
#include "cm_os.h"
#define CM_PRT_INF(fmt,arg...) app_printf("[CM_INF]line %d in %s:"fmt,__LINE__,__FILE__,##arg)
#define CM_PRT_WRN(fmt,arg...) app_printf("[CM_WRN]line %d in %s:"fmt,__LINE__,__FILE__,##arg)
#define CM_PRT_ERR(fmt,arg...) app_printf("[CM_ERR]line %d in %s:"fmt,__LINE__,__FILE__,##arg)
/**
* \brief 串口接收数据结构体
*/
typedef struct
{
unsigned char buf[1024];
int len;
}cm_uart_recv_data_buf_t;
void app_uart_init(void);
void app_uart_close(void);
void app_printf (char *str, ...);
#endif