datatype.h

来自「ST7032i驱动应用实例(I2C接口)」· C头文件 代码 · 共 51 行

H
51
字号
#ifndef __DATATYPES__
#define __DATATYPES__

typedef char int8;
typedef int  int16;
typedef long int32;

typedef unsigned char uint8;
typedef unsigned int  uint16;
typedef unsigned long uint32;

#define FlashByte const uint8 PROGMEM
#define FlashWord const uint16 PROGMEM

typedef uint8* str;
// ---------------------------- Data Structures --------------------------------
// The structure of color data
typedef struct ColorInfo
{
	uint8 Bdata;
	uint8 Gdata;
	uint8 Rdata;	
}tColor;

// Information for drawing a rectangle
typedef struct RectInfo
{
	uint8 X0;	// Upleft
	uint8 Y0; 
	uint8 X1; 	// Downright
	uint8 Y1;
}tRect;

// Information for LCM
typedef struct LCM_Info
{
	str Name;
	str Interface;
	str Customer;
}tLCM;

// The structure of Hanzi
typedef struct typFNT_GB16
{
	uint8 Index[2];		// GB2312
	uint8 Msk[32];		// Mask data
}tFont1616;
// -----------------------------------------------------------------------------

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?