media.h
上传用户:dahaojd
上传日期:2008-01-29
资源大小:14357k
文件大小:2k
- /*
- * Copyright 2003 by Texas Instruments Incorporated.
- * All rights reserved. Property of Texas Instruments Incorporated.
- * Restricted rights to use, duplicate or disclose this code are
- * granted through contract.
- *
- */
- /* "@(#) DDK 1.11.00.00 11-04-03 (ddk-b13)" */
- /*
- * ======== media.h ========
- *
- */
- #ifndef __MEDIA_H
- #define __MEDIA_H
- /* Base value of the MEDIA types */
- #define MEDIA_TYPEBASE 0x1000
- /* Generic MEDIA Control Commands */
- #define MEDIA_CTRL_CMD_FIRST (IOM_USER + 0x40)
- #define MEDIA_CTRL_GETMEDIATYPE (MEDIA_CTRL_CMD_FIRST + 0x0)
- #define MEDIA_CTRL_REINITIALIZE (MEDIA_CTRL_CMD_FIRST + 0x1)
- #define MEDIA_CTRL_CMD_LAST MEDIA_CTRL_REINITIALIZE
- /* This interface is WORD-based - define size of WORD */
- #define MEDIA_WORDSZ 2
- /* To BYTESWAP or not */
- #define MEDIA_BYTENORMAL 0
- #define MEDIA_BYTESWAP 1
- /* Media presence defines */
- #define MEDIA_NOTPRESENT 0
- #define MEDIA_PRESENT 1
- /* Useful Macro Definitions */
- #define MEDIA_SWAPBYTES(input) (((input & 0xFF)<<8) | ((input & 0xFF00)>>8))
- typedef struct _MEDIA_RdWrObj
- {
- Ptr buf; /* Application supplied buffer */
- LgUns address; /* Specifies the Nth "block" at which the IO
- * transaction should take place
- */
- LgUns subAddress; /* Specifies the offset from where data should be
- * read/written, offset is in WORDs and is relative
- * to the address field
- */
- LgUns length; /* Specifes the number of words to be read/written */
- Uns reserved[24]; /* Space reserved for use by driver */
- } MEDIA_RdWrObj;
- #endif