4.115
Last change
on this file since 71e8a5c was
71e8a5c,
checked in by Daniel Hellstrom <daniel@…>, on 02/27/15 at 15:45:59
|
LIBPCI: moved copyright into a single line
|
-
Property mode set to
100644
|
File size:
1.0 KB
|
Line | |
---|
1 | /* PCI Access Library |
---|
2 | * |
---|
3 | * COPYRIGHT (c) 2010 Cobham Gaisler AB. |
---|
4 | * |
---|
5 | * The license and distribution terms for this file may be |
---|
6 | * found in the file LICENSE in this distribution or at |
---|
7 | * http://www.rtems.com/license/LICENSE. |
---|
8 | */ |
---|
9 | |
---|
10 | #include <pci.h> |
---|
11 | #include <pci/access.h> |
---|
12 | |
---|
13 | /* Read a 8-bit register over PCI I/O Space */ |
---|
14 | uint8_t pci_io_r8(uint32_t adr) |
---|
15 | { |
---|
16 | return pci_access_ops.io.read8((uint8_t *)adr); |
---|
17 | } |
---|
18 | |
---|
19 | /* Read a 16-bit I/O Register */ |
---|
20 | uint16_t pci_io_r16(uint32_t adr) |
---|
21 | { |
---|
22 | return pci_access_ops.io.read16((uint16_t *)adr); |
---|
23 | } |
---|
24 | |
---|
25 | /* Read a 32-bit I/O Register */ |
---|
26 | uint32_t pci_io_r32(uint32_t adr) |
---|
27 | { |
---|
28 | return pci_access_ops.io.read32((uint32_t *)adr); |
---|
29 | } |
---|
30 | |
---|
31 | /* Write a 8-bit I/O Register */ |
---|
32 | void pci_io_w8(uint32_t adr, uint8_t data) |
---|
33 | { |
---|
34 | pci_access_ops.io.write8((uint8_t *)adr, data); |
---|
35 | } |
---|
36 | |
---|
37 | /* Write a 16-bit I/O Register */ |
---|
38 | void pci_io_w16(uint32_t adr, uint16_t data) |
---|
39 | { |
---|
40 | pci_access_ops.io.write16((uint16_t *)adr, data); |
---|
41 | } |
---|
42 | |
---|
43 | /* Write a 32-bit I/O Register */ |
---|
44 | void pci_io_w32(uint32_t adr, uint32_t data) |
---|
45 | { |
---|
46 | pci_access_ops.io.write32((uint32_t *)adr, data); |
---|
47 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.