![]() |
|
|||
File indexing completed on 2025-05-11 08:24:08
0001 /* SPDX-License-Identifier: BSD-2-Clause */ 0002 0003 /** 0004 * @file 0005 * 0006 * @ingroup RTEMSDeviceGRLIBIO 0007 * 0008 * @brief This header file defines the register load/store interface. 0009 */ 0010 0011 /* 0012 * Copyright (C) 2021 embedded brains GmbH & Co. KG 0013 * 0014 * Redistribution and use in source and binary forms, with or without 0015 * modification, are permitted provided that the following conditions 0016 * are met: 0017 * 1. Redistributions of source code must retain the above copyright 0018 * notice, this list of conditions and the following disclaimer. 0019 * 2. Redistributions in binary form must reproduce the above copyright 0020 * notice, this list of conditions and the following disclaimer in the 0021 * documentation and/or other materials provided with the distribution. 0022 * 0023 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 0024 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 0025 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 0026 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 0027 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 0028 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 0029 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 0030 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 0031 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 0032 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 0033 * POSSIBILITY OF SUCH DAMAGE. 0034 */ 0035 0036 /* 0037 * This file is part of the RTEMS quality process and was automatically 0038 * generated. If you find something that needs to be fixed or 0039 * worded better please post a report or patch to an RTEMS mailing list 0040 * or raise a bug report: 0041 * 0042 * https://www.rtems.org/bugs.html 0043 * 0044 * For information on updating and regenerating please refer to the How-To 0045 * section in the Software Requirements Engineering chapter of the 0046 * RTEMS Software Engineering manual. The manual is provided as a part of 0047 * a release. For development sources please refer to the online 0048 * documentation at: 0049 * 0050 * https://docs.rtems.org 0051 */ 0052 0053 /* Generated from spec:/bsp/sparc/if/grlib-io-header */ 0054 0055 #ifndef _GRLIB_IO_H 0056 #define _GRLIB_IO_H 0057 0058 #include <stdint.h> 0059 0060 #ifdef __cplusplus 0061 extern "C" { 0062 #endif 0063 0064 /* Generated from spec:/bsp/sparc/if/grlib-io-group */ 0065 0066 /** 0067 * @defgroup RTEMSDeviceGRLIBIO Register Load/Store 0068 * 0069 * @ingroup RTEMSDeviceGRLIB 0070 * 0071 * @brief This group contains the GRLIB register load/store API. 0072 */ 0073 0074 /* Generated from spec:/bsp/sparc/if/grlib-load-08 */ 0075 0076 /** 0077 * @ingroup RTEMSDeviceGRLIBIO 0078 * 0079 * @brief Loads the memory-mapped unsigned 8-bit register. 0080 * 0081 * @param address is the address of the memory-mapped unsigned 8-bit register 0082 * to load. 0083 * 0084 * @return Returns the loaded register value. 0085 */ 0086 static inline uint8_t grlib_load_8( const volatile uint8_t *address ) 0087 { 0088 return *address; 0089 } 0090 0091 /* Generated from spec:/bsp/sparc/if/grlib-load-16 */ 0092 0093 /** 0094 * @ingroup RTEMSDeviceGRLIBIO 0095 * 0096 * @brief Loads the memory-mapped unsigned 16-bit register. 0097 * 0098 * @param address is the address of the memory-mapped unsigned 16-bit register 0099 * to load. 0100 * 0101 * @return Returns the loaded register value. 0102 */ 0103 static inline uint16_t grlib_load_16( const volatile uint16_t *address ) 0104 { 0105 return *address; 0106 } 0107 0108 /* Generated from spec:/bsp/sparc/if/grlib-load-32 */ 0109 0110 /** 0111 * @ingroup RTEMSDeviceGRLIBIO 0112 * 0113 * @brief Loads the memory-mapped unsigned 32-bit register. 0114 * 0115 * @param address is the address of the memory-mapped unsigned 32-bit register 0116 * to load. 0117 * 0118 * @return Returns the loaded register value. 0119 */ 0120 static inline uint32_t grlib_load_32( const volatile uint32_t *address ) 0121 { 0122 return *address; 0123 } 0124 0125 /* Generated from spec:/bsp/sparc/if/grlib-load-64 */ 0126 0127 /** 0128 * @ingroup RTEMSDeviceGRLIBIO 0129 * 0130 * @brief Loads the memory-mapped unsigned 64-bit register. 0131 * 0132 * @param address is the address of the memory-mapped unsigned 64-bit register 0133 * to load. 0134 * 0135 * @return Returns the loaded register value. 0136 */ 0137 static inline uint64_t grlib_load_64( const volatile uint64_t *address ) 0138 { 0139 return *address; 0140 } 0141 0142 /* Generated from spec:/bsp/sparc/if/grlib-store-08 */ 0143 0144 /** 0145 * @ingroup RTEMSDeviceGRLIBIO 0146 * 0147 * @brief Stores the value to the memory-mapped unsigned 8-bit register. 0148 * 0149 * @param address is the address of the memory-mapped unsigned 8-bit register. 0150 * 0151 * @param value is the value to store. 0152 */ 0153 static inline void grlib_store_8( volatile uint8_t *address, uint8_t value ) 0154 { 0155 *address = value; 0156 } 0157 0158 /* Generated from spec:/bsp/sparc/if/grlib-store-16 */ 0159 0160 /** 0161 * @ingroup RTEMSDeviceGRLIBIO 0162 * 0163 * @brief Stores the value to the memory-mapped unsigned 16-bit register. 0164 * 0165 * @param address is the address of the memory-mapped unsigned 16-bit register. 0166 * 0167 * @param value is the value to store. 0168 */ 0169 static inline void grlib_store_16( volatile uint16_t *address, uint16_t value ) 0170 { 0171 *address = value; 0172 } 0173 0174 /* Generated from spec:/bsp/sparc/if/grlib-store-32 */ 0175 0176 /** 0177 * @ingroup RTEMSDeviceGRLIBIO 0178 * 0179 * @brief Stores the value to the memory-mapped unsigned 32-bit register. 0180 * 0181 * @param address is the address of the memory-mapped unsigned 32-bit register. 0182 * 0183 * @param value is the value to store. 0184 */ 0185 static inline void grlib_store_32( volatile uint32_t *address, uint32_t value ) 0186 { 0187 *address = value; 0188 } 0189 0190 /* Generated from spec:/bsp/sparc/if/grlib-store-64 */ 0191 0192 /** 0193 * @ingroup RTEMSDeviceGRLIBIO 0194 * 0195 * @brief Stores the value to the memory-mapped unsigned 64-bit register. 0196 * 0197 * @param address is the address of the memory-mapped unsigned 64-bit register. 0198 * 0199 * @param value is the value to store. 0200 */ 0201 static inline void grlib_store_64( volatile uint64_t *address, uint64_t value ) 0202 { 0203 *address = value; 0204 } 0205 0206 #ifdef __cplusplus 0207 } 0208 #endif 0209 0210 #endif /* _GRLIB_IO_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |