#pragma pack(1)//按字节进行内存对齐 typedef struct tagBITMAPFILEHEADER { WORD bfType; DWORD bfSize; # WORD bfReserved1; WORD bfReserved2; DWORD bfOffBytes; } BITMAPFILEHEADER;
typedef struct tagBITMAPINFOHEADER { DWORD biSize; LONG biWidth; LONG biHeight; WORD biPlanes; WORD biBitCount; DWORD biCompression; DWORD biSizeImage; LONG biXPelsPerMeter; LONG biYPelsPerMeter; DWORD biClrUsed; DWORD biClrImportant; } BITMAPINFOHEADER;
---------------------------------
看了fsearch.c好经典啊
gugui.h里面的定义好多不太明白
#pragma pack(1)//按字节进行内存对齐
typedef struct tagBITMAPFILEHEADER
{
WORD bfType;
DWORD bfSize; #
WORD bfReserved1;
WORD bfReserved2;
DWORD bfOffBytes;
} BITMAPFILEHEADER;
typedef struct tagBITMAPINFOHEADER
{
DWORD biSize;
LONG biWidth;
LONG biHeight;
WORD biPlanes;
WORD biBitCount;
DWORD biCompression;
DWORD biSizeImage;
LONG biXPelsPerMeter;
LONG biYPelsPerMeter;
DWORD biClrUsed;
DWORD biClrImportant;
} BITMAPINFOHEADER;
//图片存放起始页
#define BGD_addr 0 //背景图片
#define CLK_addr 291 //时钟图片
#define LCK_addr 332 //锁屏图片
#define GDL_addr 354 //金龙标志
#define SCR_addr 361 //卷轴图片
#define ICO_addr 367 //图标图片
#define TYP_addr 647 //文件类型图片
#define FON_addr 2628//16*16汉字保存页
#define AR_addr 4095//系统参数保存页
//图片占用页数
#define BGD_size 291
#define CLK_size 41
#define LCK_size 22
#define ICO_size 14
#define GDL_size 7
#define SCR_size 6
#define TYP_size 3
#define FON_size 1467
#define Rdirection 1
#define Ldirection -1
//背景图片某一行在SPI FLASH中所在页和页内偏移
#define BGDpage(Line) ((Line*480)/528+BGD_addr)
#define BGDoffset(Line) ((Line*480)%528)
static const u16 Icoaddr[20]={ICO_addr,ICO_addr+14,ICO_addr+28,ICO_addr+42,ICO_addr+56,
ICO_addr+70,ICO_addr+84,ICO_addr+98,ICO_addr+112,ICO_addr+126,
ICO_addr+140,ICO_addr+154,ICO_addr+168,ICO_addr+182,ICO_addr+196,
ICO_addr+210,ICO_addr+224,ICO_addr+238,ICO_addr+252,ICO_addr+266};//20个系统图标保存起始页
static const u16 Typaddr[12]={TYP_addr,TYP_addr+3,TYP_addr+6,TYP_addr+9,TYP_addr+12,TYP_addr+15,
TYP_addr+18,TYP_addr+21,TYP_addr+24,TYP_addr+27,TYP_addr+30,TYP_addr+33};
这个地址是保存在FLASH中?多大的FLASH,
一周热门 更多>