leospappli.h 1.99 KB
/*
 *  F i l e N a m e  :  l e o s p a p p l i . h
 *
 ****************************************************************************
 *                   (C) Copyright ALPS Electric Co., Ltd. 1995-1996
 ****************************************************************************
 *  Version
 *
 *  ver     Date
 *  ----  --------
 *  1.02  '97-02-22  Add __leoSetReset() proto.
 *                   Change LEO_SENSE_ILLEGAL_SECTOR_SIZE value to 91 from 51.
 *  1.01  '97-01-10  Add definition LEO_SENSE_ILLEGAL_SECTOR_SIZE.
 *  1.00  '96-12-13  Initial revision .
 ****************************************************************************
*/

/*-----------------------------------*/
/*   LEO FUNCTION DEFINITIONS        */
/*-----------------------------------*/
extern s32 __leoSetReset(void);

/*-----------------------------------*/
/*   COMMAND CODE                    */
/*-----------------------------------*/
#define LEO_COMMAND_READ_LONG         0x10
#define LEO_COMMAND_WRITE_LONG        0x11
#define LEO_COMMAND_READ_SECTOR       0x12

/*-----------------------------------*/
/* CONTROL BIT                       */
/*-----------------------------------*/
#define LEO_CONTROL_ND                0x40   /* ACCESS ON NO DEFECT MODE */

/*-----------------------------------*/
/* SENSE CODE                        */
/*-----------------------------------*/
#define LEO_SENSE_ILLEGAL_SECTOR_SIZE   91

/*-----------------------------------*/
/* READ LONG(10H) command            */
/*-----------------------------------*/
typedef struct {
    LEOCmdHeader  header;
    u32           lba;
    u32           xfer_blks;
    void         *buff_ptr;
    u32           rw_bytes;
    u32           size;
} LEOCmdReadLong;

/*-----------------------------------*/
/* WRITE LONG(11H) command           */
/*-----------------------------------*/
typedef LEOCmdReadLong LEOCmdWriteLong;

/*-----------------------------------*/
/* READ SECTOR(12H) command          */
/*-----------------------------------*/
typedef LEOCmdRead LEOCmdReadSector;