⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cbiolibp.h

📁 用于EQUATOR处理器上的FAT32文件系统(vxWorks5.5)
💻 H
字号:
/* cbioLibP.h - cached block I/O device (CBIO) private header file */

/* Copyright 1999 Wind River Systems, Inc. */

/*
modification history
--------------------
01g,31aug99,jkf  written - CBIO API changes.
*/



#ifndef __INCcbioLibPh
#define __INCcbioLibPh

#ifdef __cplusplus
extern "C" {
#endif

/*
 * This module is for CBIO modules internal use only. 
 * File system level code (ie users of CBIO device modules)
 * should not include this module but rather should use 
 * the public CBIO API, cbioLib.h.
 *
 * This WRS private header file is subject to change by WRS
 * without notice.  
 */


/* include's */

#include "cbioLib.h"  		/* pull in public CBIO API */


/* macro's */

#define CBIO_READYCHANGED(x) 	((x)->cbio_readyChanged)
#define CBIO_REMOVABLE(x) 	((x)->params.cbio_removable)
#define CBIO_MODE(x) 		((x)->cbio_mode)

#ifndef CBIO_DEV_EXTRA 
#define CBIO_DEV_EXTRA void	/* module specific field */
#endif


/* typedef's */

typedef struct cbioFuncs		/* CBIO modules method functions */
    {
    STATUS	(* cbio_blkRW)		/* Read/Write blocks */
	(CBIO_DEV_ID	dev,
	 block_t	start_block,
	 block_t	num_blocks,
	 addr_t		buffer,
	 enum cbio_rw	rw,
	 cookie_t	*cookie);
    STATUS	(* cbio_BytesRW)	/* Read/Write bytes */
	(CBIO_DEV_ID 	dev,
 	 block_t	start_block,
	 off_t		offset,
	 addr_t		buffer,
	 size_t		nBytes,
	 enum cbio_rw	rw,
	 cookie_t	*cookie);
    STATUS	(* cbio_blkCopy)	/* Copy sectors */
	(CBIO_DEV_ID 	dev,
	 block_t	src_block,
	 block_t	dst_block,
	 block_t	num_blocks);
    STATUS	(* cbio_ioctl)		/* control operations */
	(CBIO_DEV_ID	dev,
	 int		command,
	 addr_t		arg);
    } CBIO_FUNCS;


typedef struct	cbio_dev		/* CBIO_DEV */
    {
    OBJ_CORE	objCore; 		/* object management */

    /* Embedded objects */

    SEMAPHORE	cbio_mutex;		/* mutex semaphore */

    /* Functions (methods) */

    struct cbioFuncs * pFuncs; 		/* cbioFuncs functions */

    /* Public attributes */

    char *	cbio_description;	/* printable descriptive string */
    short	cbio_mode;		/* O_RDONLY |O_WRONLY| O_RDWR */
    BOOL        cbio_readyChanged;      /* Device READY status indicator */
    /* ** Physical device attributes */

    CBIO_PARAMS params;			/* Physical parameters, cbioLib.h */

    /* *** Implementation defined attributes */

    caddr_t	cbio_memBase;		/* base addr of memory pool */
    size_t	cbio_memSize;		/* size of memory pool used */
    u_long	cbio_Priv0;		/* Implementation defined */
    u_long	cbio_Priv1;		/* Implementation defined */
    u_long	cbio_Priv2;		/* Implementation defined */
    u_long	cbio_Priv3;		/* Implementation defined */
    u_long	cbio_Priv4;		/* Implementation defined */
    u_long	cbio_Priv5;		/* Implementation defined */
    u_long	cbio_Priv6;		/* Implementation defined */
    u_long	cbio_Priv7;		/* Implementation defined */
    CBIO_DEV_EXTRA * pDc ;		/* Implementation defined structure */
    } CBIO_DEV;

/* externals */

IMPORT CLASS_ID	cbioClassId ;

#ifdef __cplusplus
}
#endif

#endif /* __INCcbioLibPh */

⌨️ 快捷键说明

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