typedef.h
来自「一个可以在开发板上运行的fat文件系统,是在windows平台下开发的,是学习文」· C头文件 代码 · 共 52 行
H
52 行
//-----------------------------------------------------------------------------
// This file is part of AP.FS
// AP.FS is a FAT32 file system face to the embedded system,It's target is to
// support the portable storage device such as SD Card,TF Card or USB Disc 's
// file system.
// please login www.another-prj.com to get more details.
// caiyuqing
// 2008-1-8
//-----------------------------------------------------------------------------
#ifndef BYTE
typedef unsigned char BYTE;
#endif
#ifndef BOOL
typedef unsigned int BOOL;
#endif
#ifndef UINT16
typedef unsigned short UINT16;
#endif
#ifndef UINT32
typedef unsigned long UINT32;
#endif
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef NULL
#define NULL 0
#endif
#define GET_32BIT_WORD(buffer, location) ( ((UINT32)buffer[location+3]<<24) + ((UINT32)buffer[location+2]<<16) + ((UINT32)buffer[location+1]<<8) + (UINT32)buffer[location+0] )
#define GET_16BIT_WORD(buffer, location) ( ((UINT16)buffer[location+1]<<8) + (UINT16)buffer[location+0] )
#define SET_32BIT_WORD(buffer, location, value) { buffer[location+0] = (BYTE)((value)&0xFF); \
buffer[location+1] = (BYTE)((value>>8)&0xFF); \
buffer[location+2] = (BYTE)((value>>16)&0xFF); \
buffer[location+3] = (BYTE)((value>>24)&0xFF); }
#define SET_16BIT_WORD(buffer, location, value) { buffer[location+0] = (BYTE)((value)&0xFF); \
buffer[location+1] = (BYTE)((value>>8)&0xFF); }
#define DISK_ID 0
#define DEBUG
#define printk printf
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?