4.115
Last change
on this file since 39507635 was
39507635,
checked in by Till Straumann <strauman@…>, on 07/06/10 at 20:13:02
|
2009-10-28 Till Straumann <strauman@…>
- byteorder.h: added ld_le16, st_le16.
|
-
Property mode set to
100644
|
File size:
606 bytes
|
Line | |
---|
1 | /* |
---|
2 | * The license and distribution terms for this file may be |
---|
3 | * found in found in the file LICENSE in this distribution or at |
---|
4 | * http://www.rtems.com/license/LICENSE. |
---|
5 | * |
---|
6 | * $Id$ |
---|
7 | */ |
---|
8 | |
---|
9 | #ifndef _LIBCPU_BYTEORDER_H |
---|
10 | #define _LIBCPU_BYTEORDER_H |
---|
11 | |
---|
12 | static inline void st_le32(volatile uint32_t *addr, uint32_t value) |
---|
13 | { |
---|
14 | *(addr)=value ; |
---|
15 | } |
---|
16 | |
---|
17 | static inline uint32_t ld_le32(volatile uint32_t *addr) |
---|
18 | { |
---|
19 | return(*addr); |
---|
20 | } |
---|
21 | |
---|
22 | static inline void st_le16(volatile uint16_t *addr, uint16_t value) |
---|
23 | { |
---|
24 | *(addr)=value ; |
---|
25 | } |
---|
26 | |
---|
27 | static inline uint16_t ld_le16(volatile uint16_t *addr) |
---|
28 | { |
---|
29 | return(*addr); |
---|
30 | } |
---|
31 | |
---|
32 | |
---|
33 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.