#ifndef LIBRARIES_ATEOBUS_H
#define LIBRARIES_ATEOBUS_H

/*
** $VER: ateobus.h 4.0 (02.12.99)
**
** for use with ateobus.library 4.0
**
** (C) Copyright 1998-99 Atéo Concepts SARL
**     All Rights Reserved
*/


#if 0
  #ifndef ATEO_KEY_FILE_H
  #include "ateo_concepts/ateobus/keyfile.h"
  #endif   /* ATEO_KEY_FILE_H */
#endif

#ifndef ATEO_CONCEPTS_ATEOBUS_AUTOCONFIG_H
#include <ateo_concepts/ateobus/autoconfig.h>
#endif

#define ATEOBUSNAME "ateobus.library"

#define KEYSIZE 522

#define ATEOBUS_SPACE 0x01
#define ISA_SPACE     0x02
#define IO_SPACE      0x10
#define MEMORY_SPACE  0x20

#define AC_IRQLEVELB    1
#define AC_IRQLEVELF    (1<<AC_IRQLEVELB)

/* --- KeyType ---- */
#define  KEY_HARD_DRIVE       0x80  /* si actif, la clef est base sur le disque dur, sinon sur ...*/
#define  KEY_UNKNOW           0x40


struct AC_Key {
   UBYTE    ack_Device[32];         /* device forthe key */
   UBYTE    ack_Unit;               /* unit of the key */
   UBYTE    ack_Key[KEYSIZE];       /* key */
};

struct AC_ConfigDev {
   struct Node          acd_Node;               /* For internal use only */
   UWORD                acd_Taille;             /* Size of the structures AC_ConfigDev after this field (read only!!)*/
   struct AC_Key        *acd_Key;               /* for internal use only */
   struct AteoISABoards *acd_Prefs;             /* private prefs */
   UBYTE                acd_Device[32];         /* name of the associate device */
   ULONG                acd_BaseAdr;            /* Base of the ISA space */
   ULONG                acd_Flags;              /* */
   UWORD                acd_UnitOffset;         /* Offset of the unit from the BaseAddress */
   UWORD                acd_Manufacturer;       /* manufacturer number, assigned by Commodore only! */
   UBYTE                acd_Pad0;
   UBYTE                acd_Irq;                /* Irq Level */
   UBYTE                acd_UnitNum;            /* Unit of this config dev */
   UBYTE                acd_Product;            /* product number */
   UWORD                acd_UnitSize;           /* size of the unit (multiple of 8 bytes) */
   UWORD                acd_Pad1;
   ULONG                acd_Unused[4];          /* for what the device want */
};

#endif /* LIBRARIES_ATEOBUS_H */
