guowenxue
2020-08-21 e33d5cbc798eace1baf4d6e6343873da6001a66b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/********************************************************************************************
 *        File:  common.h
 *     Version:  1.0.0
 *   Copyright:  2011 (c) Guo Wenxue <guowenxue@gmail.com>
 * Description:  A busy head file
 *   ChangeLog:  1, Release initial version on "Tue Jul 12 16:43:18 CST 2011"
 *
 *******************************************************************************************/
 
#ifndef __COMMON_H
#define __COMMON_H
 
#include <stdarg.h>
#include <types.h>
 
#ifdef DEBUG
#define dbg_print(format,args...) printf(format, ##args)
#else
#define dbg_print(format,args...) do{} while(0);
#endif
 
void serial_init(void);
void serial_send_byte(char c);
int serial_is_recv_enable(void);
int serial_recv_byte(void);
void serial_puts(const char *s);
 
/*Define in printf.c*/
void printf(const char *fmt, ...);
int sprintf(char *buf, const char *fmt, ...);
 
#endif