1 /** 2 * @file lpcmp_reva_regs.h 3 * @brief Registers, Bit Masks and Bit Positions for the LPCMP_REVA Peripheral Module. 4 */ 5 6 /****************************************************************************** 7 * 8 * Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by 9 * Analog Devices, Inc.), 10 * Copyright (C) 2023-2024 Analog Devices, Inc. 11 * 12 * Licensed under the Apache License, Version 2.0 (the "License"); 13 * you may not use this file except in compliance with the License. 14 * You may obtain a copy of the License at 15 * 16 * http://www.apache.org/licenses/LICENSE-2.0 17 * 18 * Unless required by applicable law or agreed to in writing, software 19 * distributed under the License is distributed on an "AS IS" BASIS, 20 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 * See the License for the specific language governing permissions and 22 * limitations under the License. 23 * 24 ******************************************************************************/ 25 26 #ifndef LIBRARIES_PERIPHDRIVERS_SOURCE_LPCMP_LPCMP_REVA_REGS_H_ 27 #define LIBRARIES_PERIPHDRIVERS_SOURCE_LPCMP_LPCMP_REVA_REGS_H_ 28 29 /* **** Includes **** */ 30 #include <stdint.h> 31 32 #ifdef __cplusplus 33 extern "C" { 34 #endif 35 36 #if defined (__ICCARM__) 37 #pragma system_include 38 #endif 39 40 #if defined (__CC_ARM) 41 #pragma anon_unions 42 #endif 43 /// @cond 44 /* 45 If types are not defined elsewhere (CMSIS) define them here 46 */ 47 #ifndef __IO 48 #define __IO volatile 49 #endif 50 #ifndef __I 51 #define __I volatile const 52 #endif 53 #ifndef __O 54 #define __O volatile 55 #endif 56 #ifndef __R 57 #define __R volatile const 58 #endif 59 /// @endcond 60 61 /* **** Definitions **** */ 62 63 /** 64 * @ingroup lpcmp_reva 65 * @defgroup lpcmp_reva_registers LPCMP_REVA_Registers 66 * @brief Registers, Bit Masks and Bit Positions for the LPCMP_REVA Peripheral Module. 67 * @details Low Power Comparator 68 */ 69 70 /** 71 * @ingroup lpcmp_reva_registers 72 * Structure type to access the LPCMP_REVA Registers. 73 */ 74 typedef struct { 75 __IO uint32_t ctrl[3]; /**< <tt>\b 0x00:</tt> LPCMP_REVA CTRL Register */ 76 } mxc_lpcmp_reva_regs_t; 77 78 /* Register offsets for module LPCMP_REVA */ 79 /** 80 * @ingroup lpcmp_reva_registers 81 * @defgroup LPCMP_REVA_Register_Offsets Register Offsets 82 * @brief LPCMP_REVA Peripheral Register Offsets from the LPCMP_REVA Base Peripheral Address. 83 * @{ 84 */ 85 #define MXC_R_LPCMP_REVA_CTRL ((uint32_t)0x00000000UL) /**< Offset from LPCMP_REVA Base Address: <tt> 0x0000</tt> */ 86 /**@} end of group lpcmp_reva_registers */ 87 88 /** 89 * @ingroup lpcmp_reva_registers 90 * @defgroup LPCMP_REVA_CTRL LPCMP_REVA_CTRL 91 * @brief Comparator Control Register. 92 * @{ 93 */ 94 #define MXC_F_LPCMP_REVA_CTRL_EN_POS 0 /**< CTRL_EN Position */ 95 #define MXC_F_LPCMP_REVA_CTRL_EN ((uint32_t)(0x1UL << MXC_F_LPCMP_REVA_CTRL_EN_POS)) /**< CTRL_EN Mask */ 96 97 #define MXC_F_LPCMP_REVA_CTRL_POL_POS 5 /**< CTRL_POL Position */ 98 #define MXC_F_LPCMP_REVA_CTRL_POL ((uint32_t)(0x1UL << MXC_F_LPCMP_REVA_CTRL_POL_POS)) /**< CTRL_POL Mask */ 99 100 #define MXC_F_LPCMP_REVA_CTRL_INT_EN_POS 6 /**< CTRL_INT_EN Position */ 101 #define MXC_F_LPCMP_REVA_CTRL_INT_EN ((uint32_t)(0x1UL << MXC_F_LPCMP_REVA_CTRL_INT_EN_POS)) /**< CTRL_INT_EN Mask */ 102 103 #define MXC_F_LPCMP_REVA_CTRL_OUT_POS 14 /**< CTRL_OUT Position */ 104 #define MXC_F_LPCMP_REVA_CTRL_OUT ((uint32_t)(0x1UL << MXC_F_LPCMP_REVA_CTRL_OUT_POS)) /**< CTRL_OUT Mask */ 105 106 #define MXC_F_LPCMP_REVA_CTRL_INT_FL_POS 15 /**< CTRL_INT_FL Position */ 107 #define MXC_F_LPCMP_REVA_CTRL_INT_FL ((uint32_t)(0x1UL << MXC_F_LPCMP_REVA_CTRL_INT_FL_POS)) /**< CTRL_INT_FL Mask */ 108 109 /**@} end of group LPCMP_REVA_CTRL_Register */ 110 111 #ifdef __cplusplus 112 } 113 #endif 114 115 #endif // LIBRARIES_PERIPHDRIVERS_SOURCE_LPCMP_LPCMP_REVA_REGS_H_ 116 117