|
| 1 | +/** |
| 2 | + * \file |
| 3 | + * |
| 4 | + * \brief Component description for GPBR |
| 5 | + * |
| 6 | + * Copyright (c) 2019 Microchip Technology Inc. |
| 7 | + * |
| 8 | + * \license_start |
| 9 | + * |
| 10 | + * \page License |
| 11 | + * |
| 12 | + * SPDX-License-Identifier: Apache-2.0 |
| 13 | + * |
| 14 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 15 | + * you may not use this file except in compliance with the License. |
| 16 | + * You may obtain a copy of the License at |
| 17 | + * |
| 18 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 19 | + * |
| 20 | + * Unless required by applicable law or agreed to in writing, software |
| 21 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 22 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 23 | + * See the License for the specific language governing permissions and |
| 24 | + * limitations under the License. |
| 25 | + * |
| 26 | + * \license_stop |
| 27 | + * |
| 28 | + */ |
| 29 | + |
| 30 | +/* file generated from device description version 2017-01-08T14:00:00Z */ |
| 31 | +#ifndef _SAMV70_GPBR_COMPONENT_H_ |
| 32 | +#define _SAMV70_GPBR_COMPONENT_H_ |
| 33 | +#define _SAMV70_GPBR_COMPONENT_ /**< \deprecated Backward compatibility for ASF */ |
| 34 | + |
| 35 | +/** \addtogroup SAMV_SAMV70 General Purpose Backup Registers |
| 36 | + * @{ |
| 37 | + */ |
| 38 | +/* ========================================================================== */ |
| 39 | +/** SOFTWARE API DEFINITION FOR GPBR */ |
| 40 | +/* ========================================================================== */ |
| 41 | +#ifndef COMPONENT_TYPEDEF_STYLE |
| 42 | + #define COMPONENT_TYPEDEF_STYLE 'R' /**< Defines default style of typedefs for the component header files ('R' = RFO, 'N' = NTO)*/ |
| 43 | +#endif |
| 44 | + |
| 45 | +#define GPBR_6378 /**< (GPBR) Module ID */ |
| 46 | +#define REV_GPBR H /**< (GPBR) Module revision */ |
| 47 | + |
| 48 | +/* -------- GPBR_SYS_GPBR : (GPBR Offset: 0x00) (R/W 32) General Purpose Backup Register 0 -------- */ |
| 49 | +#if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) |
| 50 | +#if COMPONENT_TYPEDEF_STYLE == 'N' |
| 51 | +typedef union { |
| 52 | + struct { |
| 53 | + uint32_t GPBR_VALUE:32; /**< bit: 0..31 Value of GPBR x */ |
| 54 | + } bit; /**< Structure used for bit access */ |
| 55 | + uint32_t reg; /**< Type used for register access */ |
| 56 | +} GPBR_SYS_GPBR_Type; |
| 57 | +#endif |
| 58 | +#endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */ |
| 59 | + |
| 60 | +#define GPBR_SYS_GPBR_OFFSET (0x00) /**< (GPBR_SYS_GPBR) General Purpose Backup Register 0 Offset */ |
| 61 | + |
| 62 | +#define GPBR_SYS_GPBR_GPBR_VALUE_Pos 0 /**< (GPBR_SYS_GPBR) Value of GPBR x Position */ |
| 63 | +#define GPBR_SYS_GPBR_GPBR_VALUE_Msk (_U_(0xFFFFFFFF) << GPBR_SYS_GPBR_GPBR_VALUE_Pos) /**< (GPBR_SYS_GPBR) Value of GPBR x Mask */ |
| 64 | +#define GPBR_SYS_GPBR_GPBR_VALUE(value) (GPBR_SYS_GPBR_GPBR_VALUE_Msk & ((value) << GPBR_SYS_GPBR_GPBR_VALUE_Pos)) |
| 65 | +#define GPBR_SYS_GPBR_MASK _U_(0xFFFFFFFF) /**< \deprecated (GPBR_SYS_GPBR) Register MASK (Use GPBR_SYS_GPBR_Msk instead) */ |
| 66 | +#define GPBR_SYS_GPBR_Msk _U_(0xFFFFFFFF) /**< (GPBR_SYS_GPBR) Register Mask */ |
| 67 | + |
| 68 | + |
| 69 | +#if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) |
| 70 | +#if COMPONENT_TYPEDEF_STYLE == 'R' |
| 71 | +/** \brief GPBR hardware registers */ |
| 72 | +typedef struct { |
| 73 | + __IO uint32_t SYS_GPBR[8]; /**< (GPBR Offset: 0x00) General Purpose Backup Register 0 */ |
| 74 | +} Gpbr; |
| 75 | + |
| 76 | +#elif COMPONENT_TYPEDEF_STYLE == 'N' |
| 77 | +/** \brief GPBR hardware registers */ |
| 78 | +typedef struct { |
| 79 | + __IO GPBR_SYS_GPBR_Type SYS_GPBR[8]; /**< Offset: 0x00 (R/W 32) General Purpose Backup Register 0 */ |
| 80 | +} Gpbr; |
| 81 | + |
| 82 | +#else /* COMPONENT_TYPEDEF_STYLE */ |
| 83 | +#error Unknown component typedef style |
| 84 | +#endif /* COMPONENT_TYPEDEF_STYLE */ |
| 85 | + |
| 86 | +#endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */ |
| 87 | +/** @} end of General Purpose Backup Registers */ |
| 88 | + |
| 89 | +#endif /* _SAMV70_GPBR_COMPONENT_H_ */ |
0 commit comments