📄 rprint.h
字号:
/*rprint.h 头文件*/
/********************************************************************
* 版本说明:1.0 *
* 作者: andylee *
* 日期: 2006年7月 *
* 平台: mega16 16M *
* 说明: 通用的显示驱动功能函数库 *
********************************************************************/
#ifndef RPRINTF_H
#define RPRINTF_H
//#define RPRINTF_FLOAT
// configuration
#ifndef RPRINTF_COMPLEX
#define RPRINTF_SIMPLE
#endif
// defines/constants
#define STRING_IN_RAM 0
#define STRING_IN_ROM 1
// make a putchar for those that are used to using it
//#define putchar(c) rprintfChar(c);
/// You must call this initializer once before using any other rprintf function.
void rprintfInit(void (*putchar_func)(unsigned char c));
//! prints a single character to the current output device
void rprintfChar(unsigned char c);
//! prints a null-terminated string stored in RAM
void rprintfStr(char str[]);
void rprintfStrLen(char str[], unsigned int start, unsigned int len);
void rprintfProgStr(const char str[]);
//! Prints a carriage-return and line-feed.
/// Useful when printing to serial ports/terminals.
void rprintfCRLF(void);
// Prints the number contained in "data" in hex format
// u04,u08,u16,and u32 functions handle 4,8,16,or 32 bits respectively
void rprintfu04(unsigned char data); ///< Print 4-bit hex number. Outputs a single hex character.
void rprintfu08(unsigned char data); ///< Print 8-bit hex number. Outputs two hex characters.
void rprintfu16(unsigned short data); ///< Print 16-bit hex number. Outputs four hex characters.
void rprintfu32(unsigned long data); ///< Print 32-bit hex number. Outputs eight hex characters.
#ifdef RPRINTF_FLOAT
//! floating-point print routine
void rprintfFloat(char numDigits, double x);
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -