RTEMS CPU Kit with SuperCore
4.11.3
Main Page
Related Pages
Modules
+
Data Structures
Data Structures
+
Data Fields
+
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Files
File List
+
Globals
+
All
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Functions
_
a
b
c
d
e
f
g
i
j
l
m
n
o
p
q
r
s
t
u
v
w
+
Variables
_
b
c
d
i
r
+
Typedefs
a
b
c
d
f
h
i
m
o
p
q
r
s
t
u
w
x
+
Enumerations
b
c
d
e
h
i
m
o
p
r
s
t
w
+
Enumerator
c
i
m
p
r
s
t
w
+
Macros
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
w
mnt
data0
chrisj
rtems
releases
rtems-release.git
4.11.3
ws-rtems
rtems-4.11.3
cpukit
libfs
src
rfs
rtems-rfs-data.h
Go to the documentation of this file.
1
16
/*
17
* COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
18
*
19
* The license and distribution terms for this file may be
20
* found in the file LICENSE in this distribution or at
21
* http://www.rtems.org/license/LICENSE.
22
*/
23
24
25
#if !defined (_RTEMS_RFS_DATA_H_)
26
#define _RTEMS_RFS_DATA_H_
27
28
#include <stdint.h>
29
33
#define rtems_rfs_data_ptr(_d) ((uint8_t*)(_d))
34
38
#define rtems_rfs_data_get(_d, _t, _o, _s) \
39
(((_t)(rtems_rfs_data_ptr (_d)[_o])) << (_s))
40
44
#define rtems_rfs_read_u8(_d) \
45
(*rtems_rfs_data_ptr (_d))
46
50
#define rtems_rfs_read_u16(_d) \
51
(rtems_rfs_data_get (_d, uint16_t, 0, 8) | \
52
rtems_rfs_data_get (_d, uint16_t, 1, 0))
53
57
#define rtems_rfs_read_u32(_d) \
58
(rtems_rfs_data_get (_d, uint32_t, 0, 24) | \
59
rtems_rfs_data_get (_d, uint32_t, 1, 16) | \
60
rtems_rfs_data_get (_d, uint32_t, 2, 8) | \
61
rtems_rfs_data_get (_d, uint32_t, 3, 0))
62
66
#define rtems_rfs_write_u8(_d, _v) \
67
(*rtems_rfs_data_ptr (_d) = (uint8_t)(_v))
68
72
#define rtems_rfs_write_u16(_d, _v) \
73
do { \
74
rtems_rfs_data_ptr (_d)[0] = (uint8_t)(((uint16_t)(_v)) >> 8); \
75
rtems_rfs_data_ptr (_d)[1] = (uint8_t)((_v)); \
76
} while (0)
77
81
#define rtems_rfs_write_u32(_d, _v) \
82
do { \
83
rtems_rfs_data_ptr (_d)[0] = (uint8_t)(((uint32_t)(_v)) >> 24); \
84
rtems_rfs_data_ptr (_d)[1] = (uint8_t)(((uint32_t)(_v)) >> 16); \
85
rtems_rfs_data_ptr (_d)[2] = (uint8_t)(((uint32_t)(_v)) >> 8); \
86
rtems_rfs_data_ptr (_d)[3] = (uint8_t)((uint32_t)(_v)); \
87
} while (0)
88
89
#endif
Generated by
1.8.13