Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.
Dependents: 1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB
Fork of mbed by
TARGET_EFM32HG_STK3400/efm32hg_idac.h@120:2eb10e18b8d7, 2016-04-13 (annotated)
- Committer:
- elijahorr
- Date:
- Wed Apr 13 12:29:27 2016 +0000
- Revision:
- 120:2eb10e18b8d7
- Parent:
- 113:f141b2784e32
V1.1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Kojto | 98:8ab26030e058 | 1 | /**************************************************************************//** |
Kojto | 98:8ab26030e058 | 2 | * @file efm32hg_idac.h |
Kojto | 98:8ab26030e058 | 3 | * @brief EFM32HG_IDAC register and bit field definitions |
Kojto | 113:f141b2784e32 | 4 | * @version 4.2.0 |
Kojto | 98:8ab26030e058 | 5 | ****************************************************************************** |
Kojto | 98:8ab26030e058 | 6 | * @section License |
Kojto | 113:f141b2784e32 | 7 | * <b>Copyright 2015 Silicon Laboratories, Inc. http://www.silabs.com</b> |
Kojto | 98:8ab26030e058 | 8 | ****************************************************************************** |
Kojto | 98:8ab26030e058 | 9 | * |
Kojto | 98:8ab26030e058 | 10 | * Permission is granted to anyone to use this software for any purpose, |
Kojto | 98:8ab26030e058 | 11 | * including commercial applications, and to alter it and redistribute it |
Kojto | 98:8ab26030e058 | 12 | * freely, subject to the following restrictions: |
Kojto | 98:8ab26030e058 | 13 | * |
Kojto | 98:8ab26030e058 | 14 | * 1. The origin of this software must not be misrepresented; you must not |
Kojto | 98:8ab26030e058 | 15 | * claim that you wrote the original software.@n |
Kojto | 98:8ab26030e058 | 16 | * 2. Altered source versions must be plainly marked as such, and must not be |
Kojto | 98:8ab26030e058 | 17 | * misrepresented as being the original software.@n |
Kojto | 98:8ab26030e058 | 18 | * 3. This notice may not be removed or altered from any source distribution. |
Kojto | 98:8ab26030e058 | 19 | * |
Kojto | 98:8ab26030e058 | 20 | * DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Silicon Laboratories, Inc. |
Kojto | 98:8ab26030e058 | 21 | * has no obligation to support this Software. Silicon Laboratories, Inc. is |
Kojto | 98:8ab26030e058 | 22 | * providing the Software "AS IS", with no express or implied warranties of any |
Kojto | 98:8ab26030e058 | 23 | * kind, including, but not limited to, any implied warranties of |
Kojto | 98:8ab26030e058 | 24 | * merchantability or fitness for any particular purpose or warranties against |
Kojto | 98:8ab26030e058 | 25 | * infringement of any proprietary rights of a third party. |
Kojto | 98:8ab26030e058 | 26 | * |
Kojto | 98:8ab26030e058 | 27 | * Silicon Laboratories, Inc. will not be liable for any consequential, |
Kojto | 98:8ab26030e058 | 28 | * incidental, or special damages, or any other relief, or for any claim by |
Kojto | 98:8ab26030e058 | 29 | * any third party, arising from your use of this Software. |
Kojto | 98:8ab26030e058 | 30 | * |
Kojto | 98:8ab26030e058 | 31 | *****************************************************************************/ |
Kojto | 98:8ab26030e058 | 32 | /**************************************************************************//** |
Kojto | 113:f141b2784e32 | 33 | * @addtogroup Parts |
Kojto | 113:f141b2784e32 | 34 | * @{ |
Kojto | 113:f141b2784e32 | 35 | ******************************************************************************/ |
Kojto | 113:f141b2784e32 | 36 | /**************************************************************************//** |
Kojto | 98:8ab26030e058 | 37 | * @defgroup EFM32HG_IDAC |
Kojto | 98:8ab26030e058 | 38 | * @{ |
Kojto | 98:8ab26030e058 | 39 | * @brief EFM32HG_IDAC Register Declaration |
Kojto | 98:8ab26030e058 | 40 | *****************************************************************************/ |
Kojto | 98:8ab26030e058 | 41 | typedef struct |
Kojto | 98:8ab26030e058 | 42 | { |
Kojto | 98:8ab26030e058 | 43 | __IO uint32_t CTRL; /**< Control Register */ |
Kojto | 98:8ab26030e058 | 44 | __IO uint32_t CURPROG; /**< Current Programming Register */ |
Kojto | 98:8ab26030e058 | 45 | __IO uint32_t CAL; /**< Calibration Register */ |
Kojto | 98:8ab26030e058 | 46 | __IO uint32_t DUTYCONFIG; /**< Duty Cycle Configauration Register */ |
Kojto | 98:8ab26030e058 | 47 | } IDAC_TypeDef; /** @} */ |
Kojto | 98:8ab26030e058 | 48 | |
Kojto | 98:8ab26030e058 | 49 | /**************************************************************************//** |
Kojto | 98:8ab26030e058 | 50 | * @defgroup EFM32HG_IDAC_BitFields |
Kojto | 98:8ab26030e058 | 51 | * @{ |
Kojto | 98:8ab26030e058 | 52 | *****************************************************************************/ |
Kojto | 98:8ab26030e058 | 53 | |
Kojto | 98:8ab26030e058 | 54 | /* Bit fields for IDAC CTRL */ |
Kojto | 98:8ab26030e058 | 55 | #define _IDAC_CTRL_RESETVALUE 0x00000000UL /**< Default value for IDAC_CTRL */ |
Kojto | 98:8ab26030e058 | 56 | #define _IDAC_CTRL_MASK 0x0074001FUL /**< Mask for IDAC_CTRL */ |
Kojto | 98:8ab26030e058 | 57 | #define IDAC_CTRL_EN (0x1UL << 0) /**< Current DAC Enable */ |
Kojto | 98:8ab26030e058 | 58 | #define _IDAC_CTRL_EN_SHIFT 0 /**< Shift value for IDAC_EN */ |
Kojto | 98:8ab26030e058 | 59 | #define _IDAC_CTRL_EN_MASK 0x1UL /**< Bit mask for IDAC_EN */ |
Kojto | 98:8ab26030e058 | 60 | #define _IDAC_CTRL_EN_DEFAULT 0x00000000UL /**< Mode DEFAULT for IDAC_CTRL */ |
Kojto | 98:8ab26030e058 | 61 | #define IDAC_CTRL_EN_DEFAULT (_IDAC_CTRL_EN_DEFAULT << 0) /**< Shifted mode DEFAULT for IDAC_CTRL */ |
Kojto | 98:8ab26030e058 | 62 | #define IDAC_CTRL_CURSINK (0x1UL << 1) /**< Current Sink Enable */ |
Kojto | 98:8ab26030e058 | 63 | #define _IDAC_CTRL_CURSINK_SHIFT 1 /**< Shift value for IDAC_CURSINK */ |
Kojto | 98:8ab26030e058 | 64 | #define _IDAC_CTRL_CURSINK_MASK 0x2UL /**< Bit mask for IDAC_CURSINK */ |
Kojto | 98:8ab26030e058 | 65 | #define _IDAC_CTRL_CURSINK_DEFAULT 0x00000000UL /**< Mode DEFAULT for IDAC_CTRL */ |
Kojto | 98:8ab26030e058 | 66 | #define IDAC_CTRL_CURSINK_DEFAULT (_IDAC_CTRL_CURSINK_DEFAULT << 1) /**< Shifted mode DEFAULT for IDAC_CTRL */ |
Kojto | 98:8ab26030e058 | 67 | #define IDAC_CTRL_MINOUTTRANS (0x1UL << 2) /**< Minimum Output Transition Enable */ |
Kojto | 98:8ab26030e058 | 68 | #define _IDAC_CTRL_MINOUTTRANS_SHIFT 2 /**< Shift value for IDAC_MINOUTTRANS */ |
Kojto | 98:8ab26030e058 | 69 | #define _IDAC_CTRL_MINOUTTRANS_MASK 0x4UL /**< Bit mask for IDAC_MINOUTTRANS */ |
Kojto | 98:8ab26030e058 | 70 | #define _IDAC_CTRL_MINOUTTRANS_DEFAULT 0x00000000UL /**< Mode DEFAULT for IDAC_CTRL */ |
Kojto | 98:8ab26030e058 | 71 | #define IDAC_CTRL_MINOUTTRANS_DEFAULT (_IDAC_CTRL_MINOUTTRANS_DEFAULT << 2) /**< Shifted mode DEFAULT for IDAC_CTRL */ |
Kojto | 98:8ab26030e058 | 72 | #define IDAC_CTRL_OUTEN (0x1UL << 3) /**< Output Enable */ |
Kojto | 98:8ab26030e058 | 73 | #define _IDAC_CTRL_OUTEN_SHIFT 3 /**< Shift value for IDAC_OUTEN */ |
Kojto | 98:8ab26030e058 | 74 | #define _IDAC_CTRL_OUTEN_MASK 0x8UL /**< Bit mask for IDAC_OUTEN */ |
Kojto | 98:8ab26030e058 | 75 | #define _IDAC_CTRL_OUTEN_DEFAULT 0x00000000UL /**< Mode DEFAULT for IDAC_CTRL */ |
Kojto | 98:8ab26030e058 | 76 | #define IDAC_CTRL_OUTEN_DEFAULT (_IDAC_CTRL_OUTEN_DEFAULT << 3) /**< Shifted mode DEFAULT for IDAC_CTRL */ |
Kojto | 98:8ab26030e058 | 77 | #define IDAC_CTRL_OUTMODE (0x1UL << 4) /**< Output Modes */ |
Kojto | 98:8ab26030e058 | 78 | #define _IDAC_CTRL_OUTMODE_SHIFT 4 /**< Shift value for IDAC_OUTMODE */ |
Kojto | 98:8ab26030e058 | 79 | #define _IDAC_CTRL_OUTMODE_MASK 0x10UL /**< Bit mask for IDAC_OUTMODE */ |
Kojto | 98:8ab26030e058 | 80 | #define _IDAC_CTRL_OUTMODE_DEFAULT 0x00000000UL /**< Mode DEFAULT for IDAC_CTRL */ |
Kojto | 98:8ab26030e058 | 81 | #define _IDAC_CTRL_OUTMODE_PIN 0x00000000UL /**< Mode PIN for IDAC_CTRL */ |
Kojto | 98:8ab26030e058 | 82 | #define _IDAC_CTRL_OUTMODE_ADC 0x00000001UL /**< Mode ADC for IDAC_CTRL */ |
Kojto | 98:8ab26030e058 | 83 | #define IDAC_CTRL_OUTMODE_DEFAULT (_IDAC_CTRL_OUTMODE_DEFAULT << 4) /**< Shifted mode DEFAULT for IDAC_CTRL */ |
Kojto | 98:8ab26030e058 | 84 | #define IDAC_CTRL_OUTMODE_PIN (_IDAC_CTRL_OUTMODE_PIN << 4) /**< Shifted mode PIN for IDAC_CTRL */ |
Kojto | 98:8ab26030e058 | 85 | #define IDAC_CTRL_OUTMODE_ADC (_IDAC_CTRL_OUTMODE_ADC << 4) /**< Shifted mode ADC for IDAC_CTRL */ |
Kojto | 98:8ab26030e058 | 86 | #define IDAC_CTRL_OUTENPRS (0x1UL << 18) /**< PRS Controlled Output Enable */ |
Kojto | 98:8ab26030e058 | 87 | #define _IDAC_CTRL_OUTENPRS_SHIFT 18 /**< Shift value for IDAC_OUTENPRS */ |
Kojto | 98:8ab26030e058 | 88 | #define _IDAC_CTRL_OUTENPRS_MASK 0x40000UL /**< Bit mask for IDAC_OUTENPRS */ |
Kojto | 98:8ab26030e058 | 89 | #define _IDAC_CTRL_OUTENPRS_DEFAULT 0x00000000UL /**< Mode DEFAULT for IDAC_CTRL */ |
Kojto | 98:8ab26030e058 | 90 | #define IDAC_CTRL_OUTENPRS_DEFAULT (_IDAC_CTRL_OUTENPRS_DEFAULT << 18) /**< Shifted mode DEFAULT for IDAC_CTRL */ |
Kojto | 98:8ab26030e058 | 91 | #define _IDAC_CTRL_PRSSEL_SHIFT 20 /**< Shift value for IDAC_PRSSEL */ |
Kojto | 98:8ab26030e058 | 92 | #define _IDAC_CTRL_PRSSEL_MASK 0x700000UL /**< Bit mask for IDAC_PRSSEL */ |
Kojto | 98:8ab26030e058 | 93 | #define _IDAC_CTRL_PRSSEL_DEFAULT 0x00000000UL /**< Mode DEFAULT for IDAC_CTRL */ |
Kojto | 98:8ab26030e058 | 94 | #define _IDAC_CTRL_PRSSEL_PRSCH0 0x00000000UL /**< Mode PRSCH0 for IDAC_CTRL */ |
Kojto | 98:8ab26030e058 | 95 | #define _IDAC_CTRL_PRSSEL_PRSCH1 0x00000001UL /**< Mode PRSCH1 for IDAC_CTRL */ |
Kojto | 98:8ab26030e058 | 96 | #define _IDAC_CTRL_PRSSEL_PRSCH2 0x00000002UL /**< Mode PRSCH2 for IDAC_CTRL */ |
Kojto | 98:8ab26030e058 | 97 | #define _IDAC_CTRL_PRSSEL_PRSCH3 0x00000003UL /**< Mode PRSCH3 for IDAC_CTRL */ |
Kojto | 98:8ab26030e058 | 98 | #define _IDAC_CTRL_PRSSEL_PRSCH4 0x00000004UL /**< Mode PRSCH4 for IDAC_CTRL */ |
Kojto | 98:8ab26030e058 | 99 | #define _IDAC_CTRL_PRSSEL_PRSCH5 0x00000005UL /**< Mode PRSCH5 for IDAC_CTRL */ |
Kojto | 98:8ab26030e058 | 100 | #define IDAC_CTRL_PRSSEL_DEFAULT (_IDAC_CTRL_PRSSEL_DEFAULT << 20) /**< Shifted mode DEFAULT for IDAC_CTRL */ |
Kojto | 98:8ab26030e058 | 101 | #define IDAC_CTRL_PRSSEL_PRSCH0 (_IDAC_CTRL_PRSSEL_PRSCH0 << 20) /**< Shifted mode PRSCH0 for IDAC_CTRL */ |
Kojto | 98:8ab26030e058 | 102 | #define IDAC_CTRL_PRSSEL_PRSCH1 (_IDAC_CTRL_PRSSEL_PRSCH1 << 20) /**< Shifted mode PRSCH1 for IDAC_CTRL */ |
Kojto | 98:8ab26030e058 | 103 | #define IDAC_CTRL_PRSSEL_PRSCH2 (_IDAC_CTRL_PRSSEL_PRSCH2 << 20) /**< Shifted mode PRSCH2 for IDAC_CTRL */ |
Kojto | 98:8ab26030e058 | 104 | #define IDAC_CTRL_PRSSEL_PRSCH3 (_IDAC_CTRL_PRSSEL_PRSCH3 << 20) /**< Shifted mode PRSCH3 for IDAC_CTRL */ |
Kojto | 98:8ab26030e058 | 105 | #define IDAC_CTRL_PRSSEL_PRSCH4 (_IDAC_CTRL_PRSSEL_PRSCH4 << 20) /**< Shifted mode PRSCH4 for IDAC_CTRL */ |
Kojto | 98:8ab26030e058 | 106 | #define IDAC_CTRL_PRSSEL_PRSCH5 (_IDAC_CTRL_PRSSEL_PRSCH5 << 20) /**< Shifted mode PRSCH5 for IDAC_CTRL */ |
Kojto | 98:8ab26030e058 | 107 | |
Kojto | 98:8ab26030e058 | 108 | /* Bit fields for IDAC CURPROG */ |
Kojto | 98:8ab26030e058 | 109 | #define _IDAC_CURPROG_RESETVALUE 0x00000000UL /**< Default value for IDAC_CURPROG */ |
Kojto | 98:8ab26030e058 | 110 | #define _IDAC_CURPROG_MASK 0x00001F03UL /**< Mask for IDAC_CURPROG */ |
Kojto | 98:8ab26030e058 | 111 | #define _IDAC_CURPROG_RANGESEL_SHIFT 0 /**< Shift value for IDAC_RANGESEL */ |
Kojto | 98:8ab26030e058 | 112 | #define _IDAC_CURPROG_RANGESEL_MASK 0x3UL /**< Bit mask for IDAC_RANGESEL */ |
Kojto | 98:8ab26030e058 | 113 | #define _IDAC_CURPROG_RANGESEL_DEFAULT 0x00000000UL /**< Mode DEFAULT for IDAC_CURPROG */ |
Kojto | 98:8ab26030e058 | 114 | #define _IDAC_CURPROG_RANGESEL_RANGE0 0x00000000UL /**< Mode RANGE0 for IDAC_CURPROG */ |
Kojto | 98:8ab26030e058 | 115 | #define _IDAC_CURPROG_RANGESEL_RANGE1 0x00000001UL /**< Mode RANGE1 for IDAC_CURPROG */ |
Kojto | 98:8ab26030e058 | 116 | #define _IDAC_CURPROG_RANGESEL_RANGE2 0x00000002UL /**< Mode RANGE2 for IDAC_CURPROG */ |
Kojto | 98:8ab26030e058 | 117 | #define _IDAC_CURPROG_RANGESEL_RANGE3 0x00000003UL /**< Mode RANGE3 for IDAC_CURPROG */ |
Kojto | 98:8ab26030e058 | 118 | #define IDAC_CURPROG_RANGESEL_DEFAULT (_IDAC_CURPROG_RANGESEL_DEFAULT << 0) /**< Shifted mode DEFAULT for IDAC_CURPROG */ |
Kojto | 98:8ab26030e058 | 119 | #define IDAC_CURPROG_RANGESEL_RANGE0 (_IDAC_CURPROG_RANGESEL_RANGE0 << 0) /**< Shifted mode RANGE0 for IDAC_CURPROG */ |
Kojto | 98:8ab26030e058 | 120 | #define IDAC_CURPROG_RANGESEL_RANGE1 (_IDAC_CURPROG_RANGESEL_RANGE1 << 0) /**< Shifted mode RANGE1 for IDAC_CURPROG */ |
Kojto | 98:8ab26030e058 | 121 | #define IDAC_CURPROG_RANGESEL_RANGE2 (_IDAC_CURPROG_RANGESEL_RANGE2 << 0) /**< Shifted mode RANGE2 for IDAC_CURPROG */ |
Kojto | 98:8ab26030e058 | 122 | #define IDAC_CURPROG_RANGESEL_RANGE3 (_IDAC_CURPROG_RANGESEL_RANGE3 << 0) /**< Shifted mode RANGE3 for IDAC_CURPROG */ |
Kojto | 98:8ab26030e058 | 123 | #define _IDAC_CURPROG_STEPSEL_SHIFT 8 /**< Shift value for IDAC_STEPSEL */ |
Kojto | 98:8ab26030e058 | 124 | #define _IDAC_CURPROG_STEPSEL_MASK 0x1F00UL /**< Bit mask for IDAC_STEPSEL */ |
Kojto | 98:8ab26030e058 | 125 | #define _IDAC_CURPROG_STEPSEL_DEFAULT 0x00000000UL /**< Mode DEFAULT for IDAC_CURPROG */ |
Kojto | 98:8ab26030e058 | 126 | #define IDAC_CURPROG_STEPSEL_DEFAULT (_IDAC_CURPROG_STEPSEL_DEFAULT << 8) /**< Shifted mode DEFAULT for IDAC_CURPROG */ |
Kojto | 98:8ab26030e058 | 127 | |
Kojto | 98:8ab26030e058 | 128 | /* Bit fields for IDAC CAL */ |
Kojto | 98:8ab26030e058 | 129 | #define _IDAC_CAL_RESETVALUE 0x00000000UL /**< Default value for IDAC_CAL */ |
Kojto | 98:8ab26030e058 | 130 | #define _IDAC_CAL_MASK 0x0000007FUL /**< Mask for IDAC_CAL */ |
Kojto | 98:8ab26030e058 | 131 | #define _IDAC_CAL_TUNING_SHIFT 0 /**< Shift value for IDAC_TUNING */ |
Kojto | 98:8ab26030e058 | 132 | #define _IDAC_CAL_TUNING_MASK 0x7FUL /**< Bit mask for IDAC_TUNING */ |
Kojto | 98:8ab26030e058 | 133 | #define _IDAC_CAL_TUNING_DEFAULT 0x00000000UL /**< Mode DEFAULT for IDAC_CAL */ |
Kojto | 98:8ab26030e058 | 134 | #define IDAC_CAL_TUNING_DEFAULT (_IDAC_CAL_TUNING_DEFAULT << 0) /**< Shifted mode DEFAULT for IDAC_CAL */ |
Kojto | 98:8ab26030e058 | 135 | |
Kojto | 98:8ab26030e058 | 136 | /* Bit fields for IDAC DUTYCONFIG */ |
Kojto | 98:8ab26030e058 | 137 | #define _IDAC_DUTYCONFIG_RESETVALUE 0x00000000UL /**< Default value for IDAC_DUTYCONFIG */ |
Kojto | 98:8ab26030e058 | 138 | #define _IDAC_DUTYCONFIG_MASK 0x00000003UL /**< Mask for IDAC_DUTYCONFIG */ |
Kojto | 98:8ab26030e058 | 139 | #define IDAC_DUTYCONFIG_DUTYCYCLEEN (0x1UL << 0) /**< Duty Cycle Enable. */ |
Kojto | 98:8ab26030e058 | 140 | #define _IDAC_DUTYCONFIG_DUTYCYCLEEN_SHIFT 0 /**< Shift value for IDAC_DUTYCYCLEEN */ |
Kojto | 98:8ab26030e058 | 141 | #define _IDAC_DUTYCONFIG_DUTYCYCLEEN_MASK 0x1UL /**< Bit mask for IDAC_DUTYCYCLEEN */ |
Kojto | 98:8ab26030e058 | 142 | #define _IDAC_DUTYCONFIG_DUTYCYCLEEN_DEFAULT 0x00000000UL /**< Mode DEFAULT for IDAC_DUTYCONFIG */ |
Kojto | 98:8ab26030e058 | 143 | #define IDAC_DUTYCONFIG_DUTYCYCLEEN_DEFAULT (_IDAC_DUTYCONFIG_DUTYCYCLEEN_DEFAULT << 0) /**< Shifted mode DEFAULT for IDAC_DUTYCONFIG */ |
Kojto | 98:8ab26030e058 | 144 | #define IDAC_DUTYCONFIG_EM2DUTYCYCLEDIS (0x1UL << 1) /**< EM2/EM3 Duty Cycle Disable. */ |
Kojto | 98:8ab26030e058 | 145 | #define _IDAC_DUTYCONFIG_EM2DUTYCYCLEDIS_SHIFT 1 /**< Shift value for IDAC_EM2DUTYCYCLEDIS */ |
Kojto | 98:8ab26030e058 | 146 | #define _IDAC_DUTYCONFIG_EM2DUTYCYCLEDIS_MASK 0x2UL /**< Bit mask for IDAC_EM2DUTYCYCLEDIS */ |
Kojto | 98:8ab26030e058 | 147 | #define _IDAC_DUTYCONFIG_EM2DUTYCYCLEDIS_DEFAULT 0x00000000UL /**< Mode DEFAULT for IDAC_DUTYCONFIG */ |
Kojto | 98:8ab26030e058 | 148 | #define IDAC_DUTYCONFIG_EM2DUTYCYCLEDIS_DEFAULT (_IDAC_DUTYCONFIG_EM2DUTYCYCLEDIS_DEFAULT << 1) /**< Shifted mode DEFAULT for IDAC_DUTYCONFIG */ |
Kojto | 98:8ab26030e058 | 149 | |
Kojto | 98:8ab26030e058 | 150 | /** @} End of group EFM32HG_IDAC */ |
Kojto | 113:f141b2784e32 | 151 | /** @} End of group Parts */ |
Kojto | 98:8ab26030e058 | 152 |