diff options
author | Jiri Gaisler <jiri@gaisler.se> | 2019-01-18 18:00:47 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-01-22 12:50:08 +0100 |
commit | 9b2b389e8d6c9a871a3d5de882fc48b13bc9f1ac (patch) | |
tree | 813132b05c576d8327ae012439feb7207289f8c6 /cpukit/score/cpu/riscv/include/libcpu/byteorder.h | |
parent | grlib: use rtems_interrupt_handler_install() (diff) | |
download | rtems-9b2b389e8d6c9a871a3d5de882fc48b13bc9f1ac.tar.bz2 |
grlib: use cpu-independent routines for uncached access
Update #3678.
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/cpu/riscv/include/libcpu/byteorder.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/cpukit/score/cpu/riscv/include/libcpu/byteorder.h b/cpukit/score/cpu/riscv/include/libcpu/byteorder.h new file mode 100644 index 0000000000..939e51fe84 --- /dev/null +++ b/cpukit/score/cpu/riscv/include/libcpu/byteorder.h @@ -0,0 +1,31 @@ +/* + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifndef _LIBCPU_BYTEORDER_H +#define _LIBCPU_BYTEORDER_H + +static inline void st_le32(volatile uint32_t *addr, uint32_t value) +{ + *(addr)=value ; +} + +static inline uint32_t ld_le32(volatile uint32_t *addr) +{ + return(*addr); +} + +static inline void st_le16(volatile uint16_t *addr, uint16_t value) +{ + *(addr)=value ; +} + +static inline uint16_t ld_le16(volatile uint16_t *addr) +{ + return(*addr); +} + + +#endif |