devices.h

来自「FAT16 Filesystem on Philips LPC2000 seri」· C头文件 代码 · 共 36 行

H
36
字号
#ifndef INC_DEVICE_TABLE_H#define INC_DEVICE_TABLE_H#include <types.h>#include <reent.h>	// describes what is found at driver level.typedef const struct {	const char	*name;		// constant to define device type: mmc, etc.	ushort	device_type;		// device methods for newlib interface.	int (*open)(struct _reent *r,const char *name, int flags, int mode);	int (*close)(struct _reent *r,int file);	_ssize_t (*read)(struct _reent *r,int file, void *ptr, size_t len);	_ssize_t (*write)(struct _reent *r,int file, const void *ptr, size_t len);		// init the device / software layers.	int (*init)(void);		// and the venerable catch-22...	int (*ioctl)(struct _reent *r, int file, int cmd, void *ptr);} DEVICE_TABLE_ENTRY;	// device number is high byte of FILE "pointer".#define	DEVICE(D)	(D << 8)#define	DEVICE_TYPE(D)	((D >> 8) & 0xff)typedef const struct {	const DEVICE_TABLE_ENTRY * item;} DEVICE_TABLE_ARRAY;typedef const DEVICE_TABLE_ARRAY * DEVICE_TABLE_LIST;#endif

⌨️ 快捷键说明

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