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