RTEMS: cpukit/score/cpu/riscv/include/libcpu/byteorder.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
byteorder.h
1/*
2 * The license and distribution terms for this file may be
3 * found in the file LICENSE in this distribution or at
4 * http://www.rtems.org/license/LICENSE.
5 */
6
7#ifndef _LIBCPU_BYTEORDER_H
8#define _LIBCPU_BYTEORDER_H
9
10static inline void st_le32(volatile uint32_t *addr, uint32_t value)
11{
12 *(addr)=value ;
13}
14
15static inline uint32_t ld_le32(volatile uint32_t *addr)
16{
17 return(*addr);
18}
19
20static inline void st_le16(volatile uint16_t *addr, uint16_t value)
21{
22 *(addr)=value ;
23}
24
25static inline uint16_t ld_le16(volatile uint16_t *addr)
26{
27 return(*addr);
28}
29
30
31#endif