Bringing flexcat 2.15 into the main branch (again)
[AROS.git] / arch / m68k-amiga / hidd / pci-prometheus / pci_resource.h
blobb4f59266d44ed9eee14a256dc58683805782b0f5
1 /*
2 * Copyright (C) 2012, The AROS Development Team
3 * All right reserved.
4 * Author: Jason S. McMullan <jason.mcmullan@gmail.com>
6 * Licensed under the AROS PUBLIC LICENSE (APL) Version 1.1
7 */
9 #ifndef PCI_RESOURCE_H
10 #define PCI_RESOURCE_H
12 #include <exec/types.h>
14 struct PCIResource {
15 struct MinNode pr_Node;
16 IPTR pr_Start, pr_End;
19 struct MinList *CreatePCIResourceList(IPTR start, IPTR size);
21 /* Dispose of a resource list */
22 VOID DeletePCIResourceList(struct MinList *reslist);
24 /* Add resources to a list */
25 VOID AddPCIResource(struct MinList *reslist, IPTR start, IPTR size);
27 /* Allocates some size aligned space from the resource
28 * list. Modifies the list (by removing the allocated chunk),
29 * and returns the new start.
31 * 'size' must be a power of 2!
33 * Returns ~0 if no allocation was available.
35 IPTR AllocPCIResource(struct MinList *reslist, IPTR size);
37 #endif /* PCI_RESOURCE_H */