diff options
author | Daniel Hellstrom <daniel@gaisler.com> | 2012-02-08 15:57:03 +0100 |
---|---|---|
committer | Gedare Bloom <gedare@rtems.org> | 2012-03-21 12:35:47 -0400 |
commit | 80d01b3cf8e4bb2998f1e8e99ed5b5d64ac8d23e (patch) | |
tree | 547fd0c47b52041da88d89c0d099659f8e1aa693 /c/src/lib/libcpu/sparc/access/access_le.c | |
parent | PR2041: sparc64: vector number not included in CPU_Interrupt_frame (diff) | |
download | rtems-80d01b3cf8e4bb2998f1e8e99ed5b5d64ac8d23e.tar.bz2 |
SPARC: added libcpu lowlevel access and byteorder routines/definitions
The low level routines can be used in different occasions, it will be
required when accessing PCI.
Note the difference between byteorder.h (inlined functions) and access.S
where the functions will be declared in the library archive librtemscpu.a.
Function names starting with _ are in library and can be referenced by
function pointers.
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Diffstat (limited to 'c/src/lib/libcpu/sparc/access/access_le.c')
-rw-r--r-- | c/src/lib/libcpu/sparc/access/access_le.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/c/src/lib/libcpu/sparc/access/access_le.c b/c/src/lib/libcpu/sparc/access/access_le.c new file mode 100644 index 0000000000..15031ccf50 --- /dev/null +++ b/c/src/lib/libcpu/sparc/access/access_le.c @@ -0,0 +1,32 @@ +/* + * Little-endian access routines for SPARC + * + * COPYRIGHT (c) 2011 + * Aeroflex Gaisler. + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + */ + +#include <libcpu/byteorder.h> + +uint16_t _ld_le16(uint16_t *addr) +{ + return ld_le16(addr); +} + +void _st_le16(uint16_t *addr, uint16_t val) +{ + st_le16(addr, val); +} + +uint32_t _ld_le32(uint32_t *addr) +{ + return ld_le32(addr); +} + +void _st_le32(uint32_t *addr, uint32_t val) +{ + st_le32(addr, val); +} |