Zephyr API Documentation
4.2.0-rc3
A Scalable Open Source RTOS
4.2.0-rc3
Toggle main menu visibility
Main Page
Related Pages
Topics
Data Structures
Data Structures
Data Structure Index
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
z
Functions
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
z
Enumerations
Enumerator
Files
File List
Globals
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
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
$
a
b
c
d
f
g
h
i
k
l
m
n
o
p
r
s
t
u
x
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Macros
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Zephyr API Documentation
Introduction
Deprecated List
Topics
Data Structures
Files
File List
doc
kernel
lib
modules
subsys
zephyr
acpi
app_memory
arch
arc
arm
arm64
common
mips
posix
riscv
riscv-privileged
arch.h
arch_inlines.h
atomic.h
csr.h
elf.h
error.h
exception.h
irq.h
reg.h
structs.h
sys_io.h
syscall.h
thread.h
rx
sparc
x86
xtensa
arch_inlines.h
arch_interface.h
cache.h
cpu.h
exception.h
structs.h
syscall.h
audio
bluetooth
canbus
console
crypto
data
debug
devicetree
dfu
display
drivers
dsp
dt-bindings
fs
input
internal
ipc
kernel
linker
llext
logging
lorawan
math
mem_mgmt
mgmt
misc
modbus
modem
multi_heap
net
platform
pm
pmci
portability
posix
psa
random
retention
rtio
sd
sensing
settings
shell
sip_svc
stats
storage
sys
task_wdt
timing
toolchain
tracing
usb
usb_c
xen
zbus
zvfs
bindesc.h
cache.h
device.h
devicetree.h
fatal.h
fatal_types.h
init.h
irq.h
irq_multilevel.h
irq_nextlevel.h
irq_offload.h
kernel.h
kernel_includes.h
kernel_structs.h
kernel_version.h
net_buf.h
shared_irq.h
smf.h
spinlock.h
sw_isr_table.h
sys_clock.h
syscall.h
toolchain.h
types.h
Globals
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
Loading...
Searching...
No Matches
reg.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2024 Meta Platforms
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
7
#ifndef ZEPHYR_INCLUDE_ZEPHYR_ARCH_RISCV_REG_H_
8
#define ZEPHYR_INCLUDE_ZEPHYR_ARCH_RISCV_REG_H_
9
10
#include <
zephyr/sys/util.h
>
11
12
#define reg_read(reg) \
13
({ \
14
register unsigned long __rv; \
15
__asm__ volatile("mv %0, " STRINGIFY(reg) : "=r"(__rv)); \
16
__rv; \
17
})
12
#define reg_read(reg) \
…
18
19
#define reg_write(reg, val) ({ __asm__("mv " STRINGIFY(reg) ", %0" : : "r"(val)); })
20
21
#endif
/* ZEPHYR_INCLUDE_ZEPHYR_ARCH_RISCV_REG_H_ */
util.h
Misc utilities.
zephyr
arch
riscv
reg.h
Generated on
for Zephyr API Documentation by
1.14.0