/*
"bus_resources_portio.h"
created by: grayspace aka J. Leveille
for: UbixOS Project
date: May 12, 2002
purpose: for port IO resource management
$Id$
*/
#ifndef _BUS_RESOURCES_PORTIO_H
#define _BUS_RESOURCES_PORTIO_H
/* for managing port IO ranges */
typedef struct tagBUS_PORTIO_POOL
{
DWORDg a_addrs[(1<<(MAXBITS_PORTIO_ADDR-5))];
}
BUS_PORTIO_POOL;
/* checks a range of port addresses
returns:
- 1 if the range is comptetely empty
- 0 otherwise */
int BUS_PORTIO_CheckRange( BUS_PORTIO_POOL * p_bpp,
DWORDg baseaddr,
DWORDg overaddr );
/* allocates a range of port addresses
returns:
- 1 on success
- 0 on failure */
int BUS_PORTIO_AllocateRange( BUS_PORTIO_POOL * p_bpp,
DWORDg baseaddr,
DWORDg overaddr );
/* frees a range of port addresses
returns:
- 1 if any port addresses in the range were allocated
- 0 otherwise */
int BUS_PORTIO_FreeRange( BUS_PORTIO_POOL * p_bpp,
DWORDg baseaddr,
DWORDg overaddr );
#endif /* _BUS_RESOURCES_PORTIO_H */