1 #ifndef CLIB_ISAPNP_PROTOS_H
2 #define CLIB_ISAPNP_PROTOS_H
5 ** $VER: isapnp_protos.h 1.1 (10.5.2001)
7 ** C prototypes. For use with 32 bit integers only.
9 ** (C) Copyright 2001 Martin Blom
10 ** All Rights Reserved.
15 #include <exec/types.h>
20 struct ISAPNP_ResourceGroup
;
21 struct ISAPNP_Resource
;
26 void ISAC_SetMasterInt( BOOL on
);
27 BOOL
ISAC_GetMasterInt( void );
29 void ISAC_SetWaitState( BOOL on
);
30 BOOL
ISAC_GetWaitState( void );
32 BOOL
ISAC_GetInterruptStatus( UBYTE interrupt
);
34 UBYTE
ISAC_GetRegByte( UWORD reg
);
35 void ISAC_SetRegByte( UWORD reg
, UBYTE value
);
37 UWORD
ISAC_GetRegWord( UWORD reg
);
38 void ISAC_SetRegWord( UWORD reg
, UWORD value
);
40 ULONG
ISAC_GetRegLong( UWORD reg
);
41 void ISAC_SetRegLong( UWORD reg
, ULONG value
);
43 UBYTE
ISAC_ReadByte( ULONG address
);
44 void ISAC_WriteByte( ULONG address
, UBYTE value
);
46 UWORD
ISAC_ReadWord( ULONG address
);
47 void ISAC_WriteWord( ULONG address
, UWORD value
);
49 ULONG
ISAC_ReadLong( ULONG address
);
50 void ISAC_WriteLong( ULONG address
, ULONG value
);
53 // Structure allocation and deallocation (private)
55 struct ISAPNP_Card
* ISAPNP_AllocCard( void );
56 void ISAPNP_FreeCard( struct ISAPNP_Card
* card
);
58 struct ISAPNP_Device
* ISAPNP_AllocDevice( void );
59 void ISAPNP_FreeDevice( struct ISAPNP_Device
* dev
);
61 struct ISAPNP_ResourceGroup
* ISAPNP_AllocResourceGroup( UBYTE pri
);
62 void ISAPNP_FreeResourceGroup( struct ISAPNP_ResourceGroup
* rg
);
64 struct ISAPNP_Resource
* ISAPNP_AllocResource( UBYTE type
);
65 void ISAPNP_FreeResource( struct ISAPNP_Resource
* r
);
68 // PnP activation (private)
70 BOOL
ISAPNP_ScanCards( void );
71 BOOL
ISAPNP_ConfigureCards( void );
74 // Card and device handling
76 struct ISAPNP_Card
* ISAPNP_FindCard( struct ISAPNP_Card
* last_card
, LONG manufacturer
, WORD product
, BYTE revision
, LONG serial
);
77 struct ISAPNP_Device
* ISAPNP_FindDevice( struct ISAPNP_Device
* last_device
, LONG manufacturer
, WORD product
, BYTE revision
);
79 APTR
ISAPNP_LockCardsA( ULONG flags
, struct ISAPNP_Card
** cards
);
80 APTR
ISAPNP_LockCards( ULONG flags
, struct ISAPNP_Card
* card
, .... );
81 void ISAPNP_UnlockCards( APTR card_lock_handle
);
83 APTR
ISAPNP_LockDevicesA( ULONG flags
, struct ISAPNP_Device
** devices
);
84 APTR
ISAPNP_LockDevices( ULONG flags
, struct ISAPNP_Device
* device
, ... );
85 void ISAPNP_UnlockDevices( APTR device_lock_handle
);
87 #endif /* CLIB_PNPISA_PROTOS_H */