etc/services - sync with NetBSD-8
[minix.git] / minix / include / ddekit / resources.h
blobdab30bb057620590c5e9bd8fc8bb5c1fc35727c9
1 #ifndef _DDEKIT_RESOURCES_H
2 #define _DDEKIT_RESOURCES_H
4 #include <ddekit/ddekit.h>
5 #include <ddekit/types.h>
8 /*
9 * request/release an isa DMA-channel
12 int ddekit_request_dma(int nr);
13 int ddekit_release_dma(int nr);
16 * request/release an io-port range starting at addr start, lenght of count
18 int ddekit_request_io(ddekit_addr_t start, ddekit_addr_t count);
19 int ddekit_release_io(ddekit_addr_t start, ddekit_addr_t count);
22 * request an IO-Memory mapping from address start to vaddr of the length count
24 int ddekit_request_mem(ddekit_addr_t start, ddekit_addr_t count,
25 ddekit_addr_t *vaddr);
26 int ddekit_release_mem(ddekit_addr_t start, ddekit_addr_t count);
28 /**
29 * Read I/O port (byte)
31 * \param port port to read
33 * \return value read from port
35 unsigned char ddekit_inb(ddekit_addr_t port);
37 /**
38 * Read I/O port (2-byte)
40 * \param port port to read
42 * \return value read from port
44 unsigned short ddekit_inw(ddekit_addr_t port);
46 /**
47 * Read I/O port (4-byte)
49 * \param port port to read
51 * \return value read from port
53 unsigned long ddekit_inl(ddekit_addr_t port);
55 /**
56 * Write I/O port (byte)
58 * \param port port to write
59 * \param val value to write
61 void ddekit_outb(ddekit_addr_t port, unsigned char val);
63 /**
64 * Write I/O port (2-byte)
66 * \param port port to write
67 * \param val value to write
69 void ddekit_outw(ddekit_addr_t port, unsigned short val);
71 /**
72 * Write I/O port (4-byte)
74 * \param port port to write
75 * \param val value to write
77 void ddekit_outl(ddekit_addr_t port, unsigned long val);
80 #endif