mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Committer:
mbed_official
Date:
Thu Sep 18 14:00:17 2014 +0100
Revision:
324:406fd2029f23
Parent:
149:1fb5f62b92bd
Synchronized with git revision a73f28e6fbca9559fbed2726410eeb4c0534a4a5

Full URL: https://github.com/mbedmicro/mbed/commit/a73f28e6fbca9559fbed2726410eeb4c0534a4a5/

Extended #476, which does not break ethernet for K64F

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 146:f64d43ff0c18 1 /*
mbed_official 146:f64d43ff0c18 2 * Copyright (c) 2013 - 2014, Freescale Semiconductor, Inc.
mbed_official 146:f64d43ff0c18 3 * All rights reserved.
mbed_official 146:f64d43ff0c18 4 *
mbed_official 146:f64d43ff0c18 5 * Redistribution and use in source and binary forms, with or without modification,
mbed_official 146:f64d43ff0c18 6 * are permitted provided that the following conditions are met:
mbed_official 146:f64d43ff0c18 7 *
mbed_official 146:f64d43ff0c18 8 * o Redistributions of source code must retain the above copyright notice, this list
mbed_official 146:f64d43ff0c18 9 * of conditions and the following disclaimer.
mbed_official 146:f64d43ff0c18 10 *
mbed_official 146:f64d43ff0c18 11 * o Redistributions in binary form must reproduce the above copyright notice, this
mbed_official 146:f64d43ff0c18 12 * list of conditions and the following disclaimer in the documentation and/or
mbed_official 146:f64d43ff0c18 13 * other materials provided with the distribution.
mbed_official 146:f64d43ff0c18 14 *
mbed_official 146:f64d43ff0c18 15 * o Neither the name of Freescale Semiconductor, Inc. nor the names of its
mbed_official 146:f64d43ff0c18 16 * contributors may be used to endorse or promote products derived from this
mbed_official 146:f64d43ff0c18 17 * software without specific prior written permission.
mbed_official 146:f64d43ff0c18 18 *
mbed_official 146:f64d43ff0c18 19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
mbed_official 146:f64d43ff0c18 20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
mbed_official 146:f64d43ff0c18 21 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 146:f64d43ff0c18 22 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
mbed_official 146:f64d43ff0c18 23 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
mbed_official 146:f64d43ff0c18 24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
mbed_official 146:f64d43ff0c18 25 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
mbed_official 146:f64d43ff0c18 26 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
mbed_official 146:f64d43ff0c18 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
mbed_official 146:f64d43ff0c18 28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 146:f64d43ff0c18 29 */
mbed_official 146:f64d43ff0c18 30 #if !defined(__FSL_PMC_HAL_H__)
mbed_official 146:f64d43ff0c18 31 #define __FSL_PMC_HAL_H__
mbed_official 146:f64d43ff0c18 32
mbed_official 146:f64d43ff0c18 33 #include <stdint.h>
mbed_official 146:f64d43ff0c18 34 #include <stdbool.h>
mbed_official 146:f64d43ff0c18 35 #include <assert.h>
mbed_official 324:406fd2029f23 36 #include "fsl_device_registers.h"
mbed_official 146:f64d43ff0c18 37 #include "fsl_pmc_features.h"
mbed_official 146:f64d43ff0c18 38
mbed_official 146:f64d43ff0c18 39 /*! @addtogroup pmc_hal*/
mbed_official 146:f64d43ff0c18 40 /*! @{*/
mbed_official 146:f64d43ff0c18 41
mbed_official 146:f64d43ff0c18 42 /*! @file fsl_pmc_hal.h */
mbed_official 146:f64d43ff0c18 43
mbed_official 146:f64d43ff0c18 44 /*******************************************************************************
mbed_official 146:f64d43ff0c18 45 * Definitions
mbed_official 146:f64d43ff0c18 46 ******************************************************************************/
mbed_official 146:f64d43ff0c18 47
mbed_official 146:f64d43ff0c18 48 /*! @brief Low-Voltage Warning Voltage Select*/
mbed_official 324:406fd2029f23 49 typedef enum _pmc_low_volt_warn_volt_select {
mbed_official 324:406fd2029f23 50 kPmcLowVoltWarnVoltLowTrip, /*!< Low trip point selected (VLVW = VLVW1)*/
mbed_official 324:406fd2029f23 51 kPmcLowVoltWarnVoltMid1Trip, /*!< Mid 1 trip point selected (VLVW = VLVW2)*/
mbed_official 324:406fd2029f23 52 kPmcLowVoltWarnVoltMid2Trip, /*!< Mid 2 trip point selected (VLVW = VLVW3)*/
mbed_official 324:406fd2029f23 53 kPmcLowVoltWarnVoltHighTrip /*!< High trip point selected (VLVW = VLVW4)*/
mbed_official 324:406fd2029f23 54 } pmc_low_volt_warn_volt_select_t;
mbed_official 146:f64d43ff0c18 55
mbed_official 146:f64d43ff0c18 56 /*! @brief Low-Voltage Detect Voltage Select*/
mbed_official 324:406fd2029f23 57 typedef enum _pmc_low_volt_detect_volt_select {
mbed_official 324:406fd2029f23 58 kPmcLowVoltDetectVoltLowTrip, /*!< Low trip point selected (V LVD = V LVDL )*/
mbed_official 324:406fd2029f23 59 kPmcLowVoltDetectVoltHighTrip, /*!< High trip point selected (V LVD = V LVDH )*/
mbed_official 324:406fd2029f23 60 } pmc_low_volt_detect_volt_select_t;
mbed_official 146:f64d43ff0c18 61
mbed_official 324:406fd2029f23 62 /*! @brief interrupt control*/
mbed_official 324:406fd2029f23 63 typedef enum _pmc_int_select {
mbed_official 324:406fd2029f23 64 kPmcIntLowVoltDetect, /*!< Low Voltage Detect Interrupt */
mbed_official 324:406fd2029f23 65 kPmcIntLowVoltWarn, /*!< Low Voltage Warning Interrupt */
mbed_official 324:406fd2029f23 66 } pmc_int_select_t;
mbed_official 146:f64d43ff0c18 67
mbed_official 146:f64d43ff0c18 68 /*******************************************************************************
mbed_official 146:f64d43ff0c18 69 * API
mbed_official 146:f64d43ff0c18 70 ******************************************************************************/
mbed_official 146:f64d43ff0c18 71
mbed_official 146:f64d43ff0c18 72 #if defined(__cplusplus)
mbed_official 146:f64d43ff0c18 73 extern "C" {
mbed_official 146:f64d43ff0c18 74 #endif /* __cplusplus*/
mbed_official 146:f64d43ff0c18 75
mbed_official 146:f64d43ff0c18 76 /*! @name Power Management Controller Control APIs*/
mbed_official 146:f64d43ff0c18 77 /*@{*/
mbed_official 146:f64d43ff0c18 78
mbed_official 146:f64d43ff0c18 79
mbed_official 146:f64d43ff0c18 80 /*!
mbed_official 324:406fd2029f23 81 * @brief Enables/Disables low voltage-related interrupts.
mbed_official 146:f64d43ff0c18 82 *
mbed_official 324:406fd2029f23 83 * This function enables the interrupt for the low voltage detection, warning,
mbed_official 324:406fd2029f23 84 * etc. When enabled, if the LVDF (Low Voltage Detect Flag) is set, a hardware
mbed_official 324:406fd2029f23 85 * interrupt occurs.
mbed_official 146:f64d43ff0c18 86 *
mbed_official 324:406fd2029f23 87 * @param baseAddr Base address for current PMC instance.
mbed_official 324:406fd2029f23 88 * @param intSelect interrut select
mbed_official 324:406fd2029f23 89 * @param enable enable/disable the interrupt
mbed_official 146:f64d43ff0c18 90 */
mbed_official 324:406fd2029f23 91 void PMC_HAL_SetLowVoltIntCmd(uint32_t baseAddr, pmc_int_select_t intSelect, bool enable);
mbed_official 146:f64d43ff0c18 92
mbed_official 146:f64d43ff0c18 93 /*!
mbed_official 324:406fd2029f23 94 * @brief Low-Voltage Detect Hardware Reset Enable/Disable (write once)
mbed_official 146:f64d43ff0c18 95 *
mbed_official 324:406fd2029f23 96 * This function enables/disables the hardware reset for the low voltage
mbed_official 324:406fd2029f23 97 * detection. When enabled, if the LVDF (Low Voltage Detect Flag) is set, a
mbed_official 324:406fd2029f23 98 * hardware reset occurs. This setting is a write-once-only. Any additional writes
mbed_official 324:406fd2029f23 99 * are ignored.
mbed_official 146:f64d43ff0c18 100 *
mbed_official 324:406fd2029f23 101 * @param baseAddr Base address for current PMC instance.
mbed_official 324:406fd2029f23 102 * @param enable enable/disable the LVD hardware reset
mbed_official 146:f64d43ff0c18 103 */
mbed_official 324:406fd2029f23 104 static inline void PMC_HAL_SetLowVoltDetectResetCmd(uint32_t baseAddr, bool enable)
mbed_official 146:f64d43ff0c18 105 {
mbed_official 324:406fd2029f23 106 BW_PMC_LVDSC1_LVDRE(baseAddr, (uint8_t)enable);
mbed_official 146:f64d43ff0c18 107 }
mbed_official 146:f64d43ff0c18 108
mbed_official 146:f64d43ff0c18 109 /*!
mbed_official 146:f64d43ff0c18 110 * @brief Low-Voltage Detect Acknowledge
mbed_official 146:f64d43ff0c18 111 *
mbed_official 146:f64d43ff0c18 112 * This function acknowledges the low voltage detection errors (write 1 to
mbed_official 146:f64d43ff0c18 113 * clear LVDF).
mbed_official 146:f64d43ff0c18 114 *
mbed_official 324:406fd2029f23 115 * @param baseAddr Base address for current PMC instance.
mbed_official 146:f64d43ff0c18 116 */
mbed_official 324:406fd2029f23 117 static inline void PMC_HAL_SetLowVoltDetectAck(uint32_t baseAddr)
mbed_official 146:f64d43ff0c18 118 {
mbed_official 324:406fd2029f23 119 BW_PMC_LVDSC1_LVDACK(baseAddr, 1);
mbed_official 146:f64d43ff0c18 120 }
mbed_official 146:f64d43ff0c18 121
mbed_official 146:f64d43ff0c18 122 /*!
mbed_official 146:f64d43ff0c18 123 * @brief Low-Voltage Detect Flag Read
mbed_official 146:f64d43ff0c18 124 *
mbed_official 324:406fd2029f23 125 * This function reads the current LVDF status. If it returns 1, a low
mbed_official 146:f64d43ff0c18 126 * voltage event is detected.
mbed_official 146:f64d43ff0c18 127 *
mbed_official 324:406fd2029f23 128 * @param baseAddr Base address for current PMC instance.
mbed_official 146:f64d43ff0c18 129 * @return status Current low voltage detect flag
mbed_official 146:f64d43ff0c18 130 * - true: Low-Voltage detected
mbed_official 146:f64d43ff0c18 131 * - false: Low-Voltage not detected
mbed_official 146:f64d43ff0c18 132 */
mbed_official 324:406fd2029f23 133 static inline bool PMC_HAL_GetLowVoltDetectFlag(uint32_t baseAddr)
mbed_official 146:f64d43ff0c18 134 {
mbed_official 324:406fd2029f23 135 return BR_PMC_LVDSC1_LVDF(baseAddr);
mbed_official 146:f64d43ff0c18 136 }
mbed_official 146:f64d43ff0c18 137
mbed_official 146:f64d43ff0c18 138 /*!
mbed_official 324:406fd2029f23 139 * @brief Sets the Low-Voltage Detect Voltage Mode
mbed_official 146:f64d43ff0c18 140 *
mbed_official 146:f64d43ff0c18 141 * This function sets the low voltage detect voltage select. It sets
mbed_official 146:f64d43ff0c18 142 * the low voltage detect trip point voltage (Vlvd). An application can select
mbed_official 146:f64d43ff0c18 143 * either a low-trip or a high-trip point. See a chip reference manual for details.
mbed_official 146:f64d43ff0c18 144 *
mbed_official 324:406fd2029f23 145 * @param baseAddr Base address for current PMC instance.
mbed_official 146:f64d43ff0c18 146 * @param select Voltage select setting defined in pmc_lvdv_select_t
mbed_official 146:f64d43ff0c18 147 */
mbed_official 324:406fd2029f23 148 static inline void PMC_HAL_SetLowVoltDetectVoltMode(uint32_t baseAddr, pmc_low_volt_detect_volt_select_t select)
mbed_official 146:f64d43ff0c18 149 {
mbed_official 324:406fd2029f23 150 BW_PMC_LVDSC1_LVDV(baseAddr, select);
mbed_official 146:f64d43ff0c18 151 }
mbed_official 146:f64d43ff0c18 152
mbed_official 146:f64d43ff0c18 153 /*!
mbed_official 324:406fd2029f23 154 * @brief Gets the Low-Voltage Detect Voltage Mode
mbed_official 146:f64d43ff0c18 155 *
mbed_official 146:f64d43ff0c18 156 * This function gets the low voltage detect voltage select. It gets
mbed_official 146:f64d43ff0c18 157 * the low voltage detect trip point voltage (Vlvd). An application can select
mbed_official 146:f64d43ff0c18 158 * either a low-trip or a high-trip point. See a chip reference manual for details.
mbed_official 146:f64d43ff0c18 159 *
mbed_official 324:406fd2029f23 160 * @param baseAddr Base address for current PMC instance.
mbed_official 146:f64d43ff0c18 161 * @return select Current voltage select setting
mbed_official 146:f64d43ff0c18 162 */
mbed_official 324:406fd2029f23 163 static inline pmc_low_volt_detect_volt_select_t PMC_HAL_GetLowVoltDetectVoltMode(uint32_t baseAddr)
mbed_official 146:f64d43ff0c18 164 {
mbed_official 324:406fd2029f23 165 return (pmc_low_volt_detect_volt_select_t)BR_PMC_LVDSC1_LVDV(baseAddr);
mbed_official 146:f64d43ff0c18 166 }
mbed_official 146:f64d43ff0c18 167
mbed_official 146:f64d43ff0c18 168 /*!
mbed_official 146:f64d43ff0c18 169 * @brief Low-Voltage Warning Acknowledge
mbed_official 146:f64d43ff0c18 170 *
mbed_official 146:f64d43ff0c18 171 * This function acknowledges the low voltage warning errors (write 1 to
mbed_official 146:f64d43ff0c18 172 * clear LVWF).
mbed_official 146:f64d43ff0c18 173 *
mbed_official 324:406fd2029f23 174 * @param baseAddr Base address for current PMC instance.
mbed_official 146:f64d43ff0c18 175 */
mbed_official 324:406fd2029f23 176 static inline void PMC_HAL_SetLowVoltWarnAck(uint32_t baseAddr)
mbed_official 146:f64d43ff0c18 177 {
mbed_official 324:406fd2029f23 178 BW_PMC_LVDSC2_LVWACK(baseAddr, 1);
mbed_official 146:f64d43ff0c18 179 }
mbed_official 146:f64d43ff0c18 180
mbed_official 146:f64d43ff0c18 181 /*!
mbed_official 146:f64d43ff0c18 182 * @brief Low-Voltage Warning Flag Read
mbed_official 146:f64d43ff0c18 183 *
mbed_official 146:f64d43ff0c18 184 * This function polls the current LVWF status. When 1 is returned, it
mbed_official 146:f64d43ff0c18 185 * indicates a low-voltage warning event. LVWF is set when V Supply transitions
mbed_official 146:f64d43ff0c18 186 * below the trip point or after reset and V Supply is already below the V LVW.
mbed_official 146:f64d43ff0c18 187 *
mbed_official 324:406fd2029f23 188 * @param baseAddr Base address for current PMC instance.
mbed_official 146:f64d43ff0c18 189 * @return status Current LVWF status
mbed_official 324:406fd2029f23 190 * - true: Low-Voltage Warning Flag is set.
mbed_official 324:406fd2029f23 191 * - false: the Low-Voltage Warning does not happen.
mbed_official 146:f64d43ff0c18 192 */
mbed_official 324:406fd2029f23 193 static inline bool PMC_HAL_GetLowVoltWarnFlag(uint32_t baseAddr)
mbed_official 146:f64d43ff0c18 194 {
mbed_official 324:406fd2029f23 195 return BR_PMC_LVDSC2_LVWF(baseAddr);
mbed_official 146:f64d43ff0c18 196 }
mbed_official 146:f64d43ff0c18 197
mbed_official 146:f64d43ff0c18 198 /*!
mbed_official 324:406fd2029f23 199 * @brief Sets the Low-Voltage Warning Voltage Mode.
mbed_official 146:f64d43ff0c18 200 *
mbed_official 146:f64d43ff0c18 201 * This function sets the low voltage warning voltage select. It sets
mbed_official 146:f64d43ff0c18 202 * the low voltage warning trip point voltage (Vlvw). An application can select
mbed_official 146:f64d43ff0c18 203 * either a low, mid1, mid2 and a high-trip point. See a chip reference manual for
mbed_official 146:f64d43ff0c18 204 * details and the pmc_lvwv_select_t for supported settings.
mbed_official 146:f64d43ff0c18 205 *
mbed_official 324:406fd2029f23 206 * @param baseAddr Base address for current PMC instance.
mbed_official 146:f64d43ff0c18 207 * @param select Low voltage warning select setting
mbed_official 146:f64d43ff0c18 208 */
mbed_official 324:406fd2029f23 209 static inline void PMC_HAL_SetLowVoltWarnVoltMode(uint32_t baseAddr, pmc_low_volt_warn_volt_select_t select)
mbed_official 146:f64d43ff0c18 210 {
mbed_official 324:406fd2029f23 211 BW_PMC_LVDSC2_LVWV(baseAddr, select);
mbed_official 146:f64d43ff0c18 212 }
mbed_official 146:f64d43ff0c18 213
mbed_official 146:f64d43ff0c18 214 /*!
mbed_official 324:406fd2029f23 215 * @brief Gets the Low-Voltage Warning Voltage Mode.
mbed_official 146:f64d43ff0c18 216 *
mbed_official 146:f64d43ff0c18 217 * This function gets the low voltage warning voltage select. It gets
mbed_official 146:f64d43ff0c18 218 * the low voltage warning trip point voltage (Vlvw). See the pmc_lvwv_select_t
mbed_official 146:f64d43ff0c18 219 * for supported settings.
mbed_official 146:f64d43ff0c18 220 *
mbed_official 324:406fd2029f23 221 * @param baseAddr Base address for current PMC instance.
mbed_official 146:f64d43ff0c18 222 * @return select Current low voltage warning select setting
mbed_official 146:f64d43ff0c18 223 */
mbed_official 324:406fd2029f23 224 static inline pmc_low_volt_warn_volt_select_t PMC_HAL_GetLowVoltWarnVoltMode(uint32_t baseAddr)
mbed_official 146:f64d43ff0c18 225 {
mbed_official 324:406fd2029f23 226 return (pmc_low_volt_warn_volt_select_t)BR_PMC_LVDSC2_LVWV(baseAddr);
mbed_official 146:f64d43ff0c18 227 }
mbed_official 146:f64d43ff0c18 228
mbed_official 324:406fd2029f23 229 #if FSL_FEATURE_PMC_HAS_BGEN
mbed_official 146:f64d43ff0c18 230 /*!
mbed_official 324:406fd2029f23 231 * @brief Enables the Bandgap in the VLPx Operation.
mbed_official 146:f64d43ff0c18 232 *
mbed_official 324:406fd2029f23 233 * This function enables/disables the bandgap in lower power modes
mbed_official 324:406fd2029f23 234 * (VLPx, * LLS, and VLLSx). When on-chip peripherals require the bandgap voltage
mbed_official 324:406fd2029f23 235 * reference in low power modes, set the BGEN to continue to enable
mbed_official 146:f64d43ff0c18 236 * the bandgap operation.
mbed_official 146:f64d43ff0c18 237 *
mbed_official 324:406fd2029f23 238 * @param baseAddr Base address for current PMC instance.
mbed_official 324:406fd2029f23 239 * @param enable enable/disable the Bangap.
mbed_official 146:f64d43ff0c18 240 */
mbed_official 324:406fd2029f23 241 static inline void PMC_HAL_SetBandgapInLowPowerModeCmd(uint32_t baseAddr, bool enable)
mbed_official 146:f64d43ff0c18 242 {
mbed_official 324:406fd2029f23 243 BW_PMC_REGSC_BGEN(baseAddr, enable);
mbed_official 146:f64d43ff0c18 244 }
mbed_official 146:f64d43ff0c18 245 #endif
mbed_official 146:f64d43ff0c18 246
mbed_official 146:f64d43ff0c18 247 /*!
mbed_official 324:406fd2029f23 248 * @brief Enables/Disables the Bandgap Buffer.
mbed_official 146:f64d43ff0c18 249 *
mbed_official 324:406fd2029f23 250 * This function enables/disables the Bandgap buffer.
mbed_official 146:f64d43ff0c18 251 *
mbed_official 324:406fd2029f23 252 * @param baseAddr Base address for current PMC instance.
mbed_official 324:406fd2029f23 253 * @param enable enable/disable the Bangap Buffer.
mbed_official 146:f64d43ff0c18 254 */
mbed_official 324:406fd2029f23 255 static inline void PMC_HAL_SetBandgapBufferCmd(uint32_t baseAddr, bool enable)
mbed_official 146:f64d43ff0c18 256 {
mbed_official 324:406fd2029f23 257 BW_PMC_REGSC_BGBE(baseAddr, enable);
mbed_official 146:f64d43ff0c18 258 }
mbed_official 146:f64d43ff0c18 259
mbed_official 146:f64d43ff0c18 260 /*!
mbed_official 324:406fd2029f23 261 * @brief Gets the acknowledge isolation value.
mbed_official 146:f64d43ff0c18 262 *
mbed_official 146:f64d43ff0c18 263 * This function reads the Acknowledge Isolation setting that indicates
mbed_official 146:f64d43ff0c18 264 * whether certain peripherals and the I/O pads are in a latched state as
mbed_official 146:f64d43ff0c18 265 * a result of having been in the VLLS mode.
mbed_official 146:f64d43ff0c18 266 *
mbed_official 324:406fd2029f23 267 * @param baseAddr Base address for current PMC instance.
mbed_official 146:f64d43ff0c18 268 * @return value ACK isolation
mbed_official 146:f64d43ff0c18 269 * 0 - Peripherals and I/O pads are in a normal run state.
mbed_official 146:f64d43ff0c18 270 * 1 - Certain peripherals and I/O pads are in an isolated and
mbed_official 146:f64d43ff0c18 271 * latched state.
mbed_official 146:f64d43ff0c18 272 */
mbed_official 324:406fd2029f23 273 static inline uint8_t PMC_HAL_GetAckIsolation(uint32_t baseAddr)
mbed_official 146:f64d43ff0c18 274 {
mbed_official 324:406fd2029f23 275 return BR_PMC_REGSC_ACKISO(baseAddr);
mbed_official 146:f64d43ff0c18 276 }
mbed_official 146:f64d43ff0c18 277
mbed_official 146:f64d43ff0c18 278 /*!
mbed_official 324:406fd2029f23 279 * @brief Clears an acknowledge isolation.
mbed_official 146:f64d43ff0c18 280 *
mbed_official 146:f64d43ff0c18 281 * This function clears the ACK Isolation flag. Writing one to this setting
mbed_official 146:f64d43ff0c18 282 * when it is set releases the I/O pads and certain peripherals to their normal
mbed_official 146:f64d43ff0c18 283 * run mode state.
mbed_official 146:f64d43ff0c18 284 *
mbed_official 324:406fd2029f23 285 * @param baseAddr Base address for current PMC instance.
mbed_official 146:f64d43ff0c18 286 */
mbed_official 324:406fd2029f23 287 static inline void PMC_HAL_SetClearAckIsolation(uint32_t baseAddr)
mbed_official 146:f64d43ff0c18 288 {
mbed_official 324:406fd2029f23 289 BW_PMC_REGSC_ACKISO(baseAddr, 1);
mbed_official 146:f64d43ff0c18 290 }
mbed_official 146:f64d43ff0c18 291
mbed_official 146:f64d43ff0c18 292 /*!
mbed_official 146:f64d43ff0c18 293 * @brief Gets the Regulator regulation status.
mbed_official 146:f64d43ff0c18 294 *
mbed_official 146:f64d43ff0c18 295 * This function returns the regulator to a run regulation status. It provides
mbed_official 146:f64d43ff0c18 296 * the current status of the internal voltage regulator.
mbed_official 146:f64d43ff0c18 297 *
mbed_official 324:406fd2029f23 298 * @param baseAddr Base address for current PMC instance.
mbed_official 146:f64d43ff0c18 299 * @return value Regulation status
mbed_official 146:f64d43ff0c18 300 * 0 - Regulator is in a stop regulation or in transition to/from it.
mbed_official 146:f64d43ff0c18 301 * 1 - Regulator is in a run regulation.
mbed_official 146:f64d43ff0c18 302 *
mbed_official 146:f64d43ff0c18 303 */
mbed_official 324:406fd2029f23 304 static inline uint8_t PMC_HAL_GetRegulatorStatus(uint32_t baseAddr)
mbed_official 146:f64d43ff0c18 305 {
mbed_official 324:406fd2029f23 306 return BR_PMC_REGSC_REGONS(baseAddr);
mbed_official 146:f64d43ff0c18 307 }
mbed_official 146:f64d43ff0c18 308
mbed_official 146:f64d43ff0c18 309 /*@}*/
mbed_official 146:f64d43ff0c18 310
mbed_official 146:f64d43ff0c18 311 #if defined(__cplusplus)
mbed_official 146:f64d43ff0c18 312 }
mbed_official 146:f64d43ff0c18 313 #endif /* __cplusplus*/
mbed_official 146:f64d43ff0c18 314
mbed_official 146:f64d43ff0c18 315 /*! @}*/
mbed_official 146:f64d43ff0c18 316
mbed_official 146:f64d43ff0c18 317 #endif /* __FSL_PMC_HAL_H__*/
mbed_official 146:f64d43ff0c18 318 /*******************************************************************************
mbed_official 146:f64d43ff0c18 319 * EOF
mbed_official 146:f64d43ff0c18 320 ******************************************************************************/
mbed_official 146:f64d43ff0c18 321