RTEMS 6.1-rc7
Loading...
Searching...
No Matches
io.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
11/*
12 * Copyright (C) 2021 embedded brains GmbH & Co. KG
13 *
14 * Redistribution and use in source and binary forms, with or without
15 * modification, are permitted provided that the following conditions
16 * are met:
17 * 1. Redistributions of source code must retain the above copyright
18 * notice, this list of conditions and the following disclaimer.
19 * 2. Redistributions in binary form must reproduce the above copyright
20 * notice, this list of conditions and the following disclaimer in the
21 * documentation and/or other materials provided with the distribution.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
27 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 * POSSIBILITY OF SUCH DAMAGE.
34 */
35
36/*
37 * This file is part of the RTEMS quality process and was automatically
38 * generated. If you find something that needs to be fixed or
39 * worded better please post a report or patch to an RTEMS mailing list
40 * or raise a bug report:
41 *
42 * https://www.rtems.org/bugs.html
43 *
44 * For information on updating and regenerating please refer to the How-To
45 * section in the Software Requirements Engineering chapter of the
46 * RTEMS Software Engineering manual. The manual is provided as a part of
47 * a release. For development sources please refer to the online
48 * documentation at:
49 *
50 * https://docs.rtems.org
51 */
52
53/* Generated from spec:/bsp/riscv/if/grlib-io-header */
54
55#ifndef _GRLIB_IO_H
56#define _GRLIB_IO_H
57
58#include <stdint.h>
59
60#ifdef __cplusplus
61extern "C" {
62#endif
63
64/* Generated from spec:/bsp/riscv/if/grlib-io-group */
65
74/* Generated from spec:/bsp/riscv/if/grlib-load-08 */
75
86static inline uint8_t grlib_load_8( const volatile uint8_t *address )
87{
88 return *address;
89}
90
91/* Generated from spec:/bsp/riscv/if/grlib-load-16 */
92
103static inline uint16_t grlib_load_16( const volatile uint16_t *address )
104{
105 return *address;
106}
107
108/* Generated from spec:/bsp/riscv/if/grlib-load-32 */
109
120static inline uint32_t grlib_load_32( const volatile uint32_t *address )
121{
122 return *address;
123}
124
125/* Generated from spec:/bsp/riscv/if/grlib-load-64 */
126
137static inline uint64_t grlib_load_64( const volatile uint64_t *address )
138{
139 return *address;
140}
141
142/* Generated from spec:/bsp/riscv/if/grlib-store-08 */
143
153static inline void grlib_store_8( volatile uint8_t *address, uint8_t value )
154{
155 *address = value;
156}
157
158/* Generated from spec:/bsp/riscv/if/grlib-store-16 */
159
169static inline void grlib_store_16( volatile uint16_t *address, uint16_t value )
170{
171 *address = value;
172}
173
174/* Generated from spec:/bsp/riscv/if/grlib-store-32 */
175
185static inline void grlib_store_32( volatile uint32_t *address, uint32_t value )
186{
187 *address = value;
188}
189
190/* Generated from spec:/bsp/riscv/if/grlib-store-64 */
191
201static inline void grlib_store_64( volatile uint64_t *address, uint64_t value )
202{
203 *address = value;
204}
205
206#ifdef __cplusplus
207}
208#endif
209
210#endif /* _GRLIB_IO_H */