Mbed for VNG board

Fork of mbed-src by mbed official

Committer:
mbed_official
Date:
Tue Dec 09 15:00:08 2014 +0000
Revision:
432:9eff63c6c55a
Parent:
324:406fd2029f23
Synchronized with git revision 3fb8590c6cb07376fc77e213c9e5cfcb7de7d743

Full URL: https://github.com/mbedmicro/mbed/commit/3fb8590c6cb07376fc77e213c9e5cfcb7de7d743/

Targets: Freescale KSDK - extern } syntax error fix

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 324:406fd2029f23 1 /*
mbed_official 324:406fd2029f23 2 * Copyright (c) 2014, Freescale Semiconductor, Inc.
mbed_official 324:406fd2029f23 3 * All rights reserved.
mbed_official 324:406fd2029f23 4 *
mbed_official 324:406fd2029f23 5 * Redistribution and use in source and binary forms, with or without modification,
mbed_official 324:406fd2029f23 6 * are permitted provided that the following conditions are met:
mbed_official 324:406fd2029f23 7 *
mbed_official 324:406fd2029f23 8 * o Redistributions of source code must retain the above copyright notice, this list
mbed_official 324:406fd2029f23 9 * of conditions and the following disclaimer.
mbed_official 324:406fd2029f23 10 *
mbed_official 324:406fd2029f23 11 * o Redistributions in binary form must reproduce the above copyright notice, this
mbed_official 324:406fd2029f23 12 * list of conditions and the following disclaimer in the documentation and/or
mbed_official 324:406fd2029f23 13 * other materials provided with the distribution.
mbed_official 324:406fd2029f23 14 *
mbed_official 324:406fd2029f23 15 * o Neither the name of Freescale Semiconductor, Inc. nor the names of its
mbed_official 324:406fd2029f23 16 * contributors may be used to endorse or promote products derived from this
mbed_official 324:406fd2029f23 17 * software without specific prior written permission.
mbed_official 324:406fd2029f23 18 *
mbed_official 324:406fd2029f23 19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
mbed_official 324:406fd2029f23 20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
mbed_official 324:406fd2029f23 21 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 324:406fd2029f23 22 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
mbed_official 324:406fd2029f23 23 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
mbed_official 324:406fd2029f23 24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
mbed_official 324:406fd2029f23 25 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
mbed_official 324:406fd2029f23 26 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
mbed_official 324:406fd2029f23 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
mbed_official 324:406fd2029f23 28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 324:406fd2029f23 29 */
mbed_official 324:406fd2029f23 30
mbed_official 324:406fd2029f23 31 #ifndef __FSL_PDB_HAL_H__
mbed_official 324:406fd2029f23 32 #define __FSL_PDB_HAL_H__
mbed_official 324:406fd2029f23 33
mbed_official 324:406fd2029f23 34 #include <stdint.h>
mbed_official 324:406fd2029f23 35 #include <stdbool.h>
mbed_official 324:406fd2029f23 36 #include <assert.h>
mbed_official 324:406fd2029f23 37 #include "fsl_device_registers.h"
mbed_official 324:406fd2029f23 38 #include "fsl_pdb_features.h"
mbed_official 324:406fd2029f23 39
mbed_official 324:406fd2029f23 40 /*!
mbed_official 324:406fd2029f23 41 * @addtogroup pdb_hal
mbed_official 324:406fd2029f23 42 * @{
mbed_official 324:406fd2029f23 43 */
mbed_official 324:406fd2029f23 44
mbed_official 324:406fd2029f23 45 /******************************************************************************
mbed_official 324:406fd2029f23 46 * Definitions
mbed_official 324:406fd2029f23 47 *****************************************************************************/
mbed_official 324:406fd2029f23 48
mbed_official 324:406fd2029f23 49 /*!
mbed_official 324:406fd2029f23 50 * @brief PDB status return codes.
mbed_official 324:406fd2029f23 51 */
mbed_official 324:406fd2029f23 52 typedef enum _pdb_status
mbed_official 324:406fd2029f23 53 {
mbed_official 324:406fd2029f23 54 kStatus_PDB_Success = 0U, /*!< Success. */
mbed_official 324:406fd2029f23 55 kStatus_PDB_InvalidArgument = 1U, /*!< Invalid argument existed. */
mbed_official 324:406fd2029f23 56 kStatus_PDB_Failed = 2U /*!< Execution failed. */
mbed_official 324:406fd2029f23 57 } pdb_status_t;
mbed_official 324:406fd2029f23 58
mbed_official 324:406fd2029f23 59 /*!
mbed_official 324:406fd2029f23 60 * @brief Defines the type of value load mode for the PDB module.
mbed_official 324:406fd2029f23 61 *
mbed_official 324:406fd2029f23 62 * Some timing related registers, such as the MOD, IDLY, CHnDLYm, INTx and POyDLY,
mbed_official 324:406fd2029f23 63 * buffer the setting values. Only the load operation is triggered.
mbed_official 324:406fd2029f23 64 * The setting value is loaded from a buffer and takes effect. There are
mbed_official 324:406fd2029f23 65 * four loading modes to fit different applications.
mbed_official 324:406fd2029f23 66 */
mbed_official 324:406fd2029f23 67 typedef enum _pdb_load_mode
mbed_official 324:406fd2029f23 68 {
mbed_official 324:406fd2029f23 69 kPdbLoadImmediately = 0U,
mbed_official 324:406fd2029f23 70 /*!< Loaded immediately after load operation. */
mbed_official 324:406fd2029f23 71 kPdbLoadAtModuloCounter = 1U,
mbed_official 324:406fd2029f23 72 /*!< Loaded when counter hits the modulo after load operation. */
mbed_official 324:406fd2029f23 73 kPdbLoadAtNextTrigger = 2U,
mbed_official 324:406fd2029f23 74 /*!< Loaded when detecting an input trigger after load operation. */
mbed_official 324:406fd2029f23 75 kPdbLoadAtModuloCounterOrNextTrigger = 3U
mbed_official 324:406fd2029f23 76 /*!< Loaded when counter hits the modulo or detecting an input trigger after load operation. */
mbed_official 324:406fd2029f23 77 } pdb_load_mode_t;
mbed_official 324:406fd2029f23 78
mbed_official 324:406fd2029f23 79 /*!
mbed_official 324:406fd2029f23 80 * @brief Defines the type of prescaler divider for the PDB counter clock.
mbed_official 324:406fd2029f23 81 */
mbed_official 324:406fd2029f23 82 typedef enum _pdb_clk_prescaler_div_mode
mbed_official 324:406fd2029f23 83 {
mbed_official 324:406fd2029f23 84 kPdbClkPreDivBy1 = 0U, /*!< Counting divided by multiplication factor selected by MULT. */
mbed_official 324:406fd2029f23 85 kPdbClkPreDivBy2 = 1U, /*!< Counting divided by multiplication factor selected by 2 times ofMULT. */
mbed_official 324:406fd2029f23 86 kPdbClkPreDivBy4 = 2U, /*!< Counting divided by multiplication factor selected by 4 times ofMULT. */
mbed_official 324:406fd2029f23 87 kPdbClkPreDivBy8 = 3U, /*!< Counting divided by multiplication factor selected by 8 times ofMULT. */
mbed_official 324:406fd2029f23 88 kPdbClkPreDivBy16 = 4U, /*!< Counting divided by multiplication factor selected by 16 times ofMULT. */
mbed_official 324:406fd2029f23 89 kPdbClkPreDivBy32 = 5U, /*!< Counting divided by multiplication factor selected by 32 times ofMULT. */
mbed_official 324:406fd2029f23 90 kPdbClkPreDivBy64 = 6U, /*!< Counting divided by multiplication factor selected by 64 times ofMULT. */
mbed_official 324:406fd2029f23 91 kPdbClkPreDivBy128 = 7U, /*!< Counting divided by multiplication factor selected by 128 times ofMULT. */
mbed_official 324:406fd2029f23 92 } pdb_clk_prescaler_div_mode_t;
mbed_official 324:406fd2029f23 93
mbed_official 324:406fd2029f23 94 /*!
mbed_official 324:406fd2029f23 95 * @brief Defines the type of trigger source mode for the PDB.
mbed_official 324:406fd2029f23 96 *
mbed_official 324:406fd2029f23 97 * Selects the trigger input source for the PDB. The trigger input source can
mbed_official 324:406fd2029f23 98 * be internal or external (EXTRG pin), or the software trigger.
mbed_official 324:406fd2029f23 99 */
mbed_official 324:406fd2029f23 100 typedef enum _pdb_trigger_src_mode
mbed_official 324:406fd2029f23 101 {
mbed_official 324:406fd2029f23 102 kPdbTrigger0 = 0U, /*!< Select trigger-In 0. */
mbed_official 324:406fd2029f23 103 kPdbTrigger1 = 1U, /*!< Select trigger-In 1. */
mbed_official 324:406fd2029f23 104 kPdbTrigger2 = 2U, /*!< Select trigger-In 2. */
mbed_official 324:406fd2029f23 105 kPdbTrigger3 = 3U, /*!< Select trigger-In 3. */
mbed_official 324:406fd2029f23 106 kPdbTrigger4 = 4U, /*!< Select trigger-In 4. */
mbed_official 324:406fd2029f23 107 kPdbTrigger5 = 5U, /*!< Select trigger-In 5. */
mbed_official 324:406fd2029f23 108 kPdbTrigger6 = 6U, /*!< Select trigger-In 6. */
mbed_official 324:406fd2029f23 109 kPdbTrigger7 = 7U, /*!< Select trigger-In 7. */
mbed_official 324:406fd2029f23 110 kPdbTrigger8 = 8U, /*!< Select trigger-In 8. */
mbed_official 324:406fd2029f23 111 kPdbTrigger9 = 9U, /*!< Select trigger-In 8. */
mbed_official 324:406fd2029f23 112 kPdbTrigger10 = 10U, /*!< Select trigger-In 10. */
mbed_official 324:406fd2029f23 113 kPdbTrigger11 = 11U, /*!< Select trigger-In 11. */
mbed_official 324:406fd2029f23 114 kPdbTrigger12 = 12U, /*!< Select trigger-In 12. */
mbed_official 324:406fd2029f23 115 kPdbTrigger13 = 13U, /*!< Select trigger-In 13. */
mbed_official 324:406fd2029f23 116 kPdbTrigger14 = 14U, /*!< Select trigger-In 14. */
mbed_official 324:406fd2029f23 117 kPdbSoftTrigger = 15U, /*!< Select software trigger. */
mbed_official 324:406fd2029f23 118 } pdb_trigger_src_mode_t;
mbed_official 324:406fd2029f23 119
mbed_official 324:406fd2029f23 120 /*!
mbed_official 324:406fd2029f23 121 * @brief Defines the type of the multiplication source mode for PDB.
mbed_official 324:406fd2029f23 122 *
mbed_official 324:406fd2029f23 123 * Selects the multiplication factor of the prescaler divider for the PDB counter clock.
mbed_official 324:406fd2029f23 124 */
mbed_official 324:406fd2029f23 125 typedef enum _pdb_mult_factor_mode
mbed_official 324:406fd2029f23 126 {
mbed_official 324:406fd2029f23 127 kPdbMultFactorAs1 = 0U, /*!< Multiplication factor is 1. */
mbed_official 324:406fd2029f23 128 kPdbMultFactorAs10 = 1U, /*!< Multiplication factor is 10. */
mbed_official 324:406fd2029f23 129 kPdbMultFactorAs20 = 2U, /*!< Multiplication factor is 20. */
mbed_official 324:406fd2029f23 130 kPdbMultFactorAs40 = 3U /*!< Multiplication factor is 40. */
mbed_official 324:406fd2029f23 131 } pdb_mult_factor_mode_t;
mbed_official 324:406fd2029f23 132
mbed_official 324:406fd2029f23 133 #if defined(__cplusplus)
mbed_official 324:406fd2029f23 134 extern "C" {
mbed_official 324:406fd2029f23 135 #endif
mbed_official 324:406fd2029f23 136
mbed_official 324:406fd2029f23 137 /*******************************************************************************
mbed_official 324:406fd2029f23 138 * API
mbed_official 324:406fd2029f23 139 ******************************************************************************/
mbed_official 324:406fd2029f23 140
mbed_official 324:406fd2029f23 141 /*!
mbed_official 324:406fd2029f23 142 * @brief Resets the PDB registers to a known state.
mbed_official 324:406fd2029f23 143 *
mbed_official 324:406fd2029f23 144 * This function resets the PDB registers to a known state. This state is
mbed_official 324:406fd2029f23 145 * defined in a reference manual and is power on reset value.
mbed_official 324:406fd2029f23 146 *
mbed_official 324:406fd2029f23 147 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 148 */
mbed_official 324:406fd2029f23 149 void PDB_HAL_Init(uint32_t baseAddr);
mbed_official 324:406fd2029f23 150
mbed_official 324:406fd2029f23 151 /*!
mbed_official 324:406fd2029f23 152 * @brief Sets the load mode for timing registers.
mbed_official 324:406fd2029f23 153 *
mbed_official 324:406fd2029f23 154 * This function sets the load mode for some timing registers including
mbed_official 324:406fd2029f23 155 * MOD, IDLY, CHnDLYm, INTx and POyDLY.
mbed_official 324:406fd2029f23 156 *
mbed_official 324:406fd2029f23 157 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 158 * @param mode Selection of mode, see to "pdb_load_mode_t".
mbed_official 324:406fd2029f23 159 */
mbed_official 324:406fd2029f23 160 static inline void PDB_HAL_SetLoadMode(uint32_t baseAddr, pdb_load_mode_t mode)
mbed_official 324:406fd2029f23 161 {
mbed_official 324:406fd2029f23 162 BW_PDB_SC_LDMOD(baseAddr, (uint32_t)mode);
mbed_official 324:406fd2029f23 163 }
mbed_official 324:406fd2029f23 164
mbed_official 324:406fd2029f23 165 /*!
mbed_official 324:406fd2029f23 166 * @brief Switches to enable the PDB sequence error interrupt.
mbed_official 324:406fd2029f23 167 *
mbed_official 324:406fd2029f23 168 * This function switches to enable the PDB sequence error interrupt.
mbed_official 324:406fd2029f23 169 *
mbed_official 324:406fd2029f23 170 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 171 * @param enable The switcher to assert the feature.
mbed_official 324:406fd2029f23 172 */
mbed_official 324:406fd2029f23 173 static inline void PDB_HAL_SetSeqErrIntCmd(uint32_t baseAddr, bool enabled)
mbed_official 324:406fd2029f23 174 {
mbed_official 324:406fd2029f23 175 BW_PDB_SC_PDBEIE(baseAddr, (enabled ? 1U : 0U) );
mbed_official 324:406fd2029f23 176 }
mbed_official 324:406fd2029f23 177
mbed_official 324:406fd2029f23 178 /*!
mbed_official 324:406fd2029f23 179 * @brief Triggers the DAC by software if enabled.
mbed_official 324:406fd2029f23 180 *
mbed_official 324:406fd2029f23 181 * If enabled, this function triggers the DAC by using software.
mbed_official 324:406fd2029f23 182 *
mbed_official 324:406fd2029f23 183 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 184 */
mbed_official 324:406fd2029f23 185 static inline void PDB_HAL_SetSoftTriggerCmd(uint32_t baseAddr)
mbed_official 324:406fd2029f23 186 {
mbed_official 324:406fd2029f23 187 BW_PDB_SC_SWTRIG(baseAddr, 1U);
mbed_official 324:406fd2029f23 188 }
mbed_official 324:406fd2029f23 189
mbed_official 324:406fd2029f23 190 /*!
mbed_official 324:406fd2029f23 191 * @brief Switches to enable the PDB DMA support.
mbed_official 324:406fd2029f23 192 *
mbed_official 324:406fd2029f23 193 * This function switches to enable the PDB DMA support.
mbed_official 324:406fd2029f23 194 *
mbed_official 324:406fd2029f23 195 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 196 * @param enable The switcher to assert the feature.
mbed_official 324:406fd2029f23 197 */
mbed_official 324:406fd2029f23 198 static inline void PDB_HAL_SetDmaCmd(uint32_t baseAddr, bool enable)
mbed_official 324:406fd2029f23 199 {
mbed_official 324:406fd2029f23 200 BW_PDB_SC_DMAEN(baseAddr, (enable ? 1U : 0U) );
mbed_official 324:406fd2029f23 201 }
mbed_official 324:406fd2029f23 202
mbed_official 324:406fd2029f23 203 /*!
mbed_official 324:406fd2029f23 204 * @brief Sets the prescaler divider from the peripheral bus clock for the PDB.
mbed_official 324:406fd2029f23 205 *
mbed_official 324:406fd2029f23 206 * This function sets the prescaler divider from the peripheral bus clock for the PDB.
mbed_official 324:406fd2029f23 207 *
mbed_official 324:406fd2029f23 208 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 209 * @param mode Selection of mode, see to "pdb_clk_prescaler_div_mode_t".
mbed_official 324:406fd2029f23 210 */
mbed_official 324:406fd2029f23 211 static inline void PDB_HAL_SetPreDivMode(uint32_t baseAddr, pdb_clk_prescaler_div_mode_t mode)
mbed_official 324:406fd2029f23 212 {
mbed_official 324:406fd2029f23 213 BW_PDB_SC_PRESCALER(baseAddr, (uint32_t)mode);
mbed_official 324:406fd2029f23 214 }
mbed_official 324:406fd2029f23 215
mbed_official 324:406fd2029f23 216 /*!
mbed_official 324:406fd2029f23 217 * @brief Sets the trigger source mode for the PDB module.
mbed_official 324:406fd2029f23 218 *
mbed_official 324:406fd2029f23 219 * This function sets the trigger source mode for the PDB module.
mbed_official 324:406fd2029f23 220 *
mbed_official 324:406fd2029f23 221 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 222 * @param mode Selection of mode, see to "pdb_trigger_src_mode_t".
mbed_official 324:406fd2029f23 223 */
mbed_official 324:406fd2029f23 224 static inline void PDB_HAL_SetTriggerSrcMode(uint32_t baseAddr, pdb_trigger_src_mode_t mode)
mbed_official 324:406fd2029f23 225 {
mbed_official 324:406fd2029f23 226 BW_PDB_SC_TRGSEL(baseAddr, (uint32_t)mode);
mbed_official 324:406fd2029f23 227 }
mbed_official 324:406fd2029f23 228
mbed_official 324:406fd2029f23 229 /*!
mbed_official 324:406fd2029f23 230 * @brief Switches on to enable the PDB module.
mbed_official 324:406fd2029f23 231 *
mbed_official 324:406fd2029f23 232 * This function switches on to enable the PDB module.
mbed_official 324:406fd2029f23 233 *
mbed_official 324:406fd2029f23 234 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 235 */
mbed_official 324:406fd2029f23 236 static inline void PDB_HAL_Enable(uint32_t baseAddr)
mbed_official 324:406fd2029f23 237 {
mbed_official 324:406fd2029f23 238 BW_PDB_SC_PDBEN(baseAddr, 1U);
mbed_official 324:406fd2029f23 239 }
mbed_official 324:406fd2029f23 240
mbed_official 324:406fd2029f23 241 /*!
mbed_official 324:406fd2029f23 242 * @brief Switches off to enable the PDB module.
mbed_official 324:406fd2029f23 243 *
mbed_official 324:406fd2029f23 244 * This function switches off to enable the PDB module.
mbed_official 324:406fd2029f23 245 *
mbed_official 324:406fd2029f23 246 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 247 */
mbed_official 324:406fd2029f23 248 static inline void PDB_HAL_Disable(uint32_t baseAddr)
mbed_official 324:406fd2029f23 249 {
mbed_official 324:406fd2029f23 250 BW_PDB_SC_PDBEN(baseAddr, 0U);
mbed_official 324:406fd2029f23 251 }
mbed_official 324:406fd2029f23 252
mbed_official 324:406fd2029f23 253 /*!
mbed_official 324:406fd2029f23 254 * @brief Gets the PDB delay interrupt flag.
mbed_official 324:406fd2029f23 255 *
mbed_official 324:406fd2029f23 256 * This function gets the PDB delay interrupt flag.
mbed_official 324:406fd2029f23 257 *
mbed_official 324:406fd2029f23 258 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 259 * @return Flat status, true if the flag is set.
mbed_official 324:406fd2029f23 260 */
mbed_official 324:406fd2029f23 261 static inline bool PDB_HAL_GetIntFlag(uint32_t baseAddr)
mbed_official 324:406fd2029f23 262 {
mbed_official 324:406fd2029f23 263 return (1U == BR_PDB_SC_PDBIF(baseAddr));
mbed_official 324:406fd2029f23 264 }
mbed_official 324:406fd2029f23 265
mbed_official 324:406fd2029f23 266 /*!
mbed_official 324:406fd2029f23 267 * @brief Clears the PDB delay interrupt flag.
mbed_official 324:406fd2029f23 268 *
mbed_official 324:406fd2029f23 269 * This function clears PDB delay interrupt flag.
mbed_official 324:406fd2029f23 270 *
mbed_official 324:406fd2029f23 271 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 272 * @return Flat status, true if the flag is set.
mbed_official 324:406fd2029f23 273 */
mbed_official 324:406fd2029f23 274 static inline void PDB_HAL_ClearIntFlag(uint32_t baseAddr)
mbed_official 324:406fd2029f23 275 {
mbed_official 324:406fd2029f23 276 BW_PDB_SC_PDBIF(baseAddr, 0U);
mbed_official 324:406fd2029f23 277 }
mbed_official 324:406fd2029f23 278
mbed_official 324:406fd2029f23 279 /*!
mbed_official 324:406fd2029f23 280 * @brief Switches to enable the PDB interrupt.
mbed_official 324:406fd2029f23 281 *
mbed_official 324:406fd2029f23 282 * This function switches to enable the PDB interrupt.
mbed_official 324:406fd2029f23 283 *
mbed_official 324:406fd2029f23 284 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 285 * @param enable The switcher to assert the feature.
mbed_official 324:406fd2029f23 286 */
mbed_official 324:406fd2029f23 287 static inline void PDB_HAL_SetIntCmd(uint32_t baseAddr, bool enable)
mbed_official 324:406fd2029f23 288 {
mbed_official 324:406fd2029f23 289 BW_PDB_SC_PDBIE(baseAddr, (enable ? 1U : 0U) );
mbed_official 324:406fd2029f23 290 }
mbed_official 324:406fd2029f23 291
mbed_official 324:406fd2029f23 292 /*!
mbed_official 324:406fd2029f23 293 * @brief Sets the PDB prescaler multiplication factor.
mbed_official 324:406fd2029f23 294 *
mbed_official 324:406fd2029f23 295 * This function sets the PDB prescaler multiplication factor.
mbed_official 324:406fd2029f23 296 *
mbed_official 324:406fd2029f23 297 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 298 * @param mode Selection of mode, see to "pdb_mult_factor_mode_t".
mbed_official 324:406fd2029f23 299 */
mbed_official 324:406fd2029f23 300 static inline void PDB_HAL_SetPreMultFactorMode(uint32_t baseAddr,
mbed_official 324:406fd2029f23 301 pdb_mult_factor_mode_t mode)
mbed_official 324:406fd2029f23 302 {
mbed_official 324:406fd2029f23 303 BW_PDB_SC_MULT(baseAddr, (uint32_t)mode);
mbed_official 324:406fd2029f23 304 }
mbed_official 324:406fd2029f23 305
mbed_official 324:406fd2029f23 306 /*!
mbed_official 324:406fd2029f23 307 * @brief Switches to enable the PDB continuous mode.
mbed_official 324:406fd2029f23 308 *
mbed_official 324:406fd2029f23 309 * This function switches to enable the PDB continuous mode.
mbed_official 324:406fd2029f23 310 *
mbed_official 324:406fd2029f23 311 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 312 * @param enable The switcher to assert the feature.
mbed_official 324:406fd2029f23 313 */
mbed_official 324:406fd2029f23 314 static inline void PDB_HAL_SetContinuousModeCmd(uint32_t baseAddr, bool enable)
mbed_official 324:406fd2029f23 315 {
mbed_official 324:406fd2029f23 316 BW_PDB_SC_CONT(baseAddr, (enable ? 1U : 0U) );
mbed_official 324:406fd2029f23 317 }
mbed_official 324:406fd2029f23 318
mbed_official 324:406fd2029f23 319 /*!
mbed_official 324:406fd2029f23 320 * @brief Loads the delay registers value for the PDB module.
mbed_official 324:406fd2029f23 321 *
mbed_official 324:406fd2029f23 322 * This function sets the LDOK bit and loads the delay registers value.
mbed_official 324:406fd2029f23 323 * Writing one to this bit updates the internal registers MOD, IDLY, CHnDLYm,
mbed_official 324:406fd2029f23 324 * DACINTx, and POyDLY with the values written to their buffers. The MOD, IDLY,
mbed_official 324:406fd2029f23 325 * CHnDLYm, DACINTx, and POyDLY take effect according to the load mode settings.
mbed_official 324:406fd2029f23 326 *
mbed_official 324:406fd2029f23 327 * After one is written to the LDOK bit, the values in the buffers of above mentioned registers
mbed_official 324:406fd2029f23 328 * are not effective and cannot be written until the values in the
mbed_official 324:406fd2029f23 329 * buffers are loaded into their internal registers.
mbed_official 324:406fd2029f23 330 * The LDOK can be written only when the the PDB is enabled or as alone with it. It is
mbed_official 324:406fd2029f23 331 * automatically cleared either when the values in the buffers are loaded into the
mbed_official 324:406fd2029f23 332 * internal registers or when the PDB is disabled.
mbed_official 324:406fd2029f23 333 *
mbed_official 324:406fd2029f23 334 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 335 */
mbed_official 324:406fd2029f23 336 static inline void PDB_HAL_SetLoadRegsCmd(uint32_t baseAddr)
mbed_official 324:406fd2029f23 337 {
mbed_official 324:406fd2029f23 338 BW_PDB_SC_LDOK(baseAddr, 1U);
mbed_official 324:406fd2029f23 339 }
mbed_official 324:406fd2029f23 340
mbed_official 324:406fd2029f23 341 /*!
mbed_official 324:406fd2029f23 342 * @brief Sets the modulus value for the PDB module.
mbed_official 324:406fd2029f23 343 *
mbed_official 324:406fd2029f23 344 * This function sets the modulus value for the PDB module.
mbed_official 324:406fd2029f23 345 * When the counter reaches the setting value, it is automatically reset to zero.
mbed_official 324:406fd2029f23 346 * When in continuous mode, the counter begins to increase
mbed_official 324:406fd2029f23 347 * again.
mbed_official 324:406fd2029f23 348 *
mbed_official 324:406fd2029f23 349 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 350 * @param value The setting value of upper limit for PDB counter.
mbed_official 324:406fd2029f23 351 */
mbed_official 324:406fd2029f23 352 static inline void PDB_HAL_SetModulusValue(uint32_t baseAddr, uint32_t value)
mbed_official 324:406fd2029f23 353 {
mbed_official 324:406fd2029f23 354 BW_PDB_MOD_MOD(baseAddr, value);
mbed_official 324:406fd2029f23 355 }
mbed_official 324:406fd2029f23 356
mbed_official 324:406fd2029f23 357 /*!
mbed_official 324:406fd2029f23 358 * @brief Gets the modulus value for the PDB module.
mbed_official 324:406fd2029f23 359 *
mbed_official 324:406fd2029f23 360 * This function gets the modulus value for the PDB module.
mbed_official 324:406fd2029f23 361 *
mbed_official 324:406fd2029f23 362 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 363 * @return The current value of upper limit for counter.
mbed_official 324:406fd2029f23 364 */
mbed_official 324:406fd2029f23 365 static inline uint32_t PDB_HAL_GetModulusValue(uint32_t baseAddr)
mbed_official 324:406fd2029f23 366 {
mbed_official 324:406fd2029f23 367 return BR_PDB_MOD_MOD(baseAddr);
mbed_official 324:406fd2029f23 368 }
mbed_official 324:406fd2029f23 369
mbed_official 324:406fd2029f23 370 /*!
mbed_official 324:406fd2029f23 371 * @brief Gets the PDB counter value.
mbed_official 324:406fd2029f23 372 *
mbed_official 324:406fd2029f23 373 * This function gets the PDB counter value.
mbed_official 324:406fd2029f23 374 *
mbed_official 324:406fd2029f23 375 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 376 * @return The current counter value.
mbed_official 324:406fd2029f23 377 */
mbed_official 324:406fd2029f23 378 static inline uint32_t PDB_HAL_GetCounterValue(uint32_t baseAddr)
mbed_official 324:406fd2029f23 379 {
mbed_official 324:406fd2029f23 380 return BR_PDB_CNT_CNT(baseAddr);
mbed_official 324:406fd2029f23 381 }
mbed_official 324:406fd2029f23 382
mbed_official 324:406fd2029f23 383 /*!
mbed_official 324:406fd2029f23 384 * @brief Sets the interrupt delay milestone of the PDB counter.
mbed_official 324:406fd2029f23 385 *
mbed_official 324:406fd2029f23 386 * This function sets the interrupt delay milestone of the PDB counter.
mbed_official 324:406fd2029f23 387 * If enabled, a PDB interrupt is generated when the counter is equal to the
mbed_official 324:406fd2029f23 388 * setting value.
mbed_official 324:406fd2029f23 389 *
mbed_official 324:406fd2029f23 390 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 391 * @param value The setting value for interrupt delay milestone of PDB counter.
mbed_official 324:406fd2029f23 392 */
mbed_official 324:406fd2029f23 393 static inline void PDB_HAL_SetIntDelayValue(uint32_t baseAddr, uint32_t value)
mbed_official 324:406fd2029f23 394 {
mbed_official 324:406fd2029f23 395 BW_PDB_IDLY_IDLY(baseAddr, value);
mbed_official 324:406fd2029f23 396 }
mbed_official 324:406fd2029f23 397
mbed_official 324:406fd2029f23 398 /*!
mbed_official 324:406fd2029f23 399 * @brief Gets the current interrupt delay milestone of the PDB counter.
mbed_official 324:406fd2029f23 400 *
mbed_official 324:406fd2029f23 401 * This function gets the current interrupt delay milestone of the PDB counter.
mbed_official 324:406fd2029f23 402 *
mbed_official 324:406fd2029f23 403 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 404 * @return The current setting value for interrupt delay milestone of PDB counter.
mbed_official 324:406fd2029f23 405 */
mbed_official 324:406fd2029f23 406 static inline uint32_t PDB_HAL_GetIntDelayValue(uint32_t baseAddr)
mbed_official 324:406fd2029f23 407 {
mbed_official 324:406fd2029f23 408 return BR_PDB_IDLY_IDLY(baseAddr);
mbed_official 324:406fd2029f23 409 }
mbed_official 324:406fd2029f23 410
mbed_official 324:406fd2029f23 411 /*!
mbed_official 324:406fd2029f23 412 * @brief Switches to enable the pre-trigger back-to-back mode.
mbed_official 324:406fd2029f23 413 *
mbed_official 324:406fd2029f23 414 * This function switches to enable the pre-trigger back-to-back mode.
mbed_official 324:406fd2029f23 415 *
mbed_official 324:406fd2029f23 416 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 417 * @param chn ADC instance index for trigger.
mbed_official 324:406fd2029f23 418 * @param preChn ADC channel group index for trigger.
mbed_official 324:406fd2029f23 419 * @param enable Switcher to assert the feature.
mbed_official 324:406fd2029f23 420 */
mbed_official 324:406fd2029f23 421 void PDB_HAL_SetPreTriggerBackToBackCmd(uint32_t baseAddr, uint32_t chn, uint32_t preChn, bool enable);
mbed_official 324:406fd2029f23 422
mbed_official 324:406fd2029f23 423 /*!
mbed_official 324:406fd2029f23 424 * @brief Switches to enable the pre-trigger output.
mbed_official 324:406fd2029f23 425 *
mbed_official 324:406fd2029f23 426 * This function switches to enable pre-trigger output.
mbed_official 324:406fd2029f23 427 *
mbed_official 324:406fd2029f23 428 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 429 * @param chn ADC instance index for trigger.
mbed_official 324:406fd2029f23 430 * @param preChn ADC channel group index for trigger.
mbed_official 324:406fd2029f23 431 * @param enable Switcher to assert the feature.
mbed_official 324:406fd2029f23 432 */
mbed_official 324:406fd2029f23 433 void PDB_HAL_SetPreTriggerOutputCmd(uint32_t baseAddr, uint32_t chn, uint32_t preChn, bool enable);
mbed_official 324:406fd2029f23 434
mbed_official 324:406fd2029f23 435 /*!
mbed_official 324:406fd2029f23 436 * @brief Switches to enable the pre-trigger.
mbed_official 324:406fd2029f23 437 *
mbed_official 324:406fd2029f23 438 * This function switches to enable the pre-trigger.
mbed_official 324:406fd2029f23 439 *
mbed_official 324:406fd2029f23 440 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 441 * @param chn ADC instance index for trigger.
mbed_official 324:406fd2029f23 442 * @param preChn ADC channel group index for trigger.
mbed_official 324:406fd2029f23 443 * @param enable Switcher to assert the feature.
mbed_official 324:406fd2029f23 444 */
mbed_official 324:406fd2029f23 445 void PDB_HAL_SetPreTriggerCmd(uint32_t baseAddr, uint32_t chn, uint32_t preChn, bool enable);
mbed_official 324:406fd2029f23 446
mbed_official 324:406fd2029f23 447 /*!
mbed_official 324:406fd2029f23 448 * @brief Gets the flag which indicates whether the PDB counter has reached the pre-trigger delay value.
mbed_official 324:406fd2029f23 449 *
mbed_official 324:406fd2029f23 450 * This function gets the flag which indicates the PDB counter has reached the
mbed_official 324:406fd2029f23 451 * pre-trigger delay value.
mbed_official 324:406fd2029f23 452 *
mbed_official 324:406fd2029f23 453 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 454 * @param chn ADC instance index for trigger.
mbed_official 324:406fd2029f23 455 * @param preChn ADC channel group index for trigger.
mbed_official 324:406fd2029f23 456 * @return Flag status. True if the event is asserted.
mbed_official 324:406fd2029f23 457 */
mbed_official 324:406fd2029f23 458 static inline bool PDB_HAL_GetPreTriggerFlag(uint32_t baseAddr, uint32_t chn, uint32_t preChn)
mbed_official 324:406fd2029f23 459 {
mbed_official 324:406fd2029f23 460 assert(chn < HW_PDB_CHnC1_COUNT);
mbed_official 324:406fd2029f23 461 assert(preChn < FSL_FEATURE_PDB_ADC_PRE_CHANNEL_COUNT);
mbed_official 324:406fd2029f23 462 return ( ((1U<< preChn) & BR_PDB_CHnS_CF(baseAddr, chn))? true: false);
mbed_official 324:406fd2029f23 463 }
mbed_official 324:406fd2029f23 464
mbed_official 324:406fd2029f23 465 /*!
mbed_official 324:406fd2029f23 466 * @brief Clears the flag which indicates that the PDB counter has reached the pre-trigger delay value.
mbed_official 324:406fd2029f23 467 *
mbed_official 324:406fd2029f23 468 * This function clears the flag which indicates that the PDB counter has reached the
mbed_official 324:406fd2029f23 469 * pre-trigger delay value.
mbed_official 324:406fd2029f23 470 *
mbed_official 324:406fd2029f23 471 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 472 * @param chn ADC instance index for trigger.
mbed_official 324:406fd2029f23 473 * @param preChn ADC channel group index for trigger.
mbed_official 324:406fd2029f23 474 */
mbed_official 324:406fd2029f23 475 void PDB_HAL_ClearPreTriggerFlag(uint32_t baseAddr, uint32_t chn, uint32_t preChn);
mbed_official 324:406fd2029f23 476
mbed_official 324:406fd2029f23 477 /*!
mbed_official 324:406fd2029f23 478 * @brief Gets the flag which indicates whether a sequence error is detected.
mbed_official 324:406fd2029f23 479 *
mbed_official 324:406fd2029f23 480 * This function gets the flag which indicates whether a sequence error is detected.
mbed_official 324:406fd2029f23 481 *
mbed_official 324:406fd2029f23 482 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 483 * @param chn ADC instance index for trigger.
mbed_official 324:406fd2029f23 484 * @param preChn ADC channel group index for trigger.
mbed_official 324:406fd2029f23 485 * @return Flag status. True if the event is asserted.
mbed_official 324:406fd2029f23 486 */
mbed_official 324:406fd2029f23 487 static inline bool PDB_HAL_GetPreTriggerSeqErrFlag(uint32_t baseAddr, uint32_t chn, uint32_t preChn)
mbed_official 324:406fd2029f23 488 {
mbed_official 324:406fd2029f23 489 assert(chn < HW_PDB_CHnC1_COUNT);
mbed_official 324:406fd2029f23 490 assert(preChn < FSL_FEATURE_PDB_ADC_PRE_CHANNEL_COUNT);
mbed_official 324:406fd2029f23 491 return ( ((1U<< preChn) & BR_PDB_CHnS_ERR(baseAddr, chn))? true: false);
mbed_official 324:406fd2029f23 492 }
mbed_official 324:406fd2029f23 493
mbed_official 324:406fd2029f23 494 /*!
mbed_official 324:406fd2029f23 495 * @brief Clears the flag which indicates that a sequence error has been detected.
mbed_official 324:406fd2029f23 496 *
mbed_official 324:406fd2029f23 497 * This function clears the flag which indicates that the sequence error has been detected.
mbed_official 324:406fd2029f23 498 *
mbed_official 324:406fd2029f23 499 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 500 * @param chn ADC instance index for trigger.
mbed_official 324:406fd2029f23 501 * @param preChn ADC channel group index for trigger.
mbed_official 324:406fd2029f23 502 */
mbed_official 324:406fd2029f23 503 void PDB_HAL_ClearPreTriggerSeqErrFlag(uint32_t baseAddr, uint32_t chn, uint32_t preChn);
mbed_official 324:406fd2029f23 504
mbed_official 324:406fd2029f23 505 /*!
mbed_official 324:406fd2029f23 506 * @brief Sets the pre-trigger delay value.
mbed_official 324:406fd2029f23 507 *
mbed_official 324:406fd2029f23 508 * This function sets the pre-trigger delay value.
mbed_official 324:406fd2029f23 509 *
mbed_official 324:406fd2029f23 510 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 511 * @param chn ADC instance index for trigger.
mbed_official 324:406fd2029f23 512 * @param preChn ADC channel group index for trigger.
mbed_official 324:406fd2029f23 513 * @param value Setting value for pre-trigger's delay value.
mbed_official 324:406fd2029f23 514 */
mbed_official 324:406fd2029f23 515 void PDB_HAL_SetPreTriggerDelayCount(uint32_t baseAddr, uint32_t chn, uint32_t preChn, uint32_t value);
mbed_official 324:406fd2029f23 516
mbed_official 324:406fd2029f23 517 /*!
mbed_official 324:406fd2029f23 518 * @brief Switches to enable the DAC external trigger input.
mbed_official 324:406fd2029f23 519 *
mbed_official 324:406fd2029f23 520 * This function switches to enable the DAC external trigger input.
mbed_official 324:406fd2029f23 521 *
mbed_official 324:406fd2029f23 522 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 523 * @param dacChn DAC instance index for trigger.
mbed_official 324:406fd2029f23 524 * @param value Setting value for pre-trigger's delay value.
mbed_official 324:406fd2029f23 525 */
mbed_official 324:406fd2029f23 526 static inline void PDB_HAL_SetDacExtTriggerInputCmd(uint32_t baseAddr, uint32_t dacChn, bool enable)
mbed_official 324:406fd2029f23 527 {
mbed_official 324:406fd2029f23 528 assert(dacChn < HW_PDB_DACINTCn_COUNT);
mbed_official 324:406fd2029f23 529 BW_PDB_DACINTCn_EXT(baseAddr, dacChn, (enable ? 1U: 0U) );
mbed_official 324:406fd2029f23 530 }
mbed_official 324:406fd2029f23 531
mbed_official 324:406fd2029f23 532 /*!
mbed_official 324:406fd2029f23 533 * @brief Switches to enable the DAC external trigger input.
mbed_official 324:406fd2029f23 534 *
mbed_official 324:406fd2029f23 535 * This function switches to enable the DAC external trigger input.
mbed_official 324:406fd2029f23 536 *
mbed_official 324:406fd2029f23 537 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 538 * @param dacChn DAC instance index for trigger.
mbed_official 324:406fd2029f23 539 * @param enable Switcher to assert the feature.
mbed_official 324:406fd2029f23 540 */
mbed_official 324:406fd2029f23 541 static inline void PDB_HAL_SetDacIntervalTriggerCmd(uint32_t baseAddr, uint32_t dacChn, bool enable)
mbed_official 324:406fd2029f23 542 {
mbed_official 324:406fd2029f23 543 assert(dacChn < HW_PDB_DACINTCn_COUNT);
mbed_official 324:406fd2029f23 544 BW_PDB_DACINTCn_TOE(baseAddr, dacChn, (enable ? 1U: 0U) );
mbed_official 324:406fd2029f23 545 }
mbed_official 324:406fd2029f23 546
mbed_official 324:406fd2029f23 547 /*!
mbed_official 324:406fd2029f23 548 * @brief Sets the interval value for the DAC trigger.
mbed_official 324:406fd2029f23 549 *
mbed_official 324:406fd2029f23 550 * This function sets the interval value for the DAC trigger.
mbed_official 324:406fd2029f23 551 *
mbed_official 324:406fd2029f23 552 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 553 * @param dacChn DAC instance index for trigger.
mbed_official 324:406fd2029f23 554 * @param value Setting value for DAC trigger interval.
mbed_official 324:406fd2029f23 555 */
mbed_official 324:406fd2029f23 556 static inline void PDB_HAL_SetDacIntervalValue(uint32_t baseAddr, uint32_t dacChn, uint32_t value)
mbed_official 324:406fd2029f23 557 {
mbed_official 324:406fd2029f23 558 assert(dacChn < HW_PDB_DACINTn_COUNT);
mbed_official 324:406fd2029f23 559 BW_PDB_DACINTn_INT(baseAddr, dacChn, value);
mbed_official 324:406fd2029f23 560 }
mbed_official 324:406fd2029f23 561
mbed_official 324:406fd2029f23 562 /*!
mbed_official 324:406fd2029f23 563 * @brief Gets the interval value for the DAC trigger.
mbed_official 324:406fd2029f23 564 *
mbed_official 324:406fd2029f23 565 * This function gets the interval value for the DAC trigger.
mbed_official 324:406fd2029f23 566 *
mbed_official 324:406fd2029f23 567 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 568 * @param dacChn DAC instance index for trigger.
mbed_official 324:406fd2029f23 569 * @return The current setting value for DAC trigger interval.
mbed_official 324:406fd2029f23 570 */
mbed_official 324:406fd2029f23 571 static inline uint32_t PDB_HAL_GetDacIntervalValue(uint32_t baseAddr, uint32_t dacChn)
mbed_official 324:406fd2029f23 572 {
mbed_official 324:406fd2029f23 573 assert(dacChn < HW_PDB_DACINTn_COUNT);
mbed_official 324:406fd2029f23 574 return BR_PDB_DACINTn_INT(baseAddr, dacChn);
mbed_official 324:406fd2029f23 575 }
mbed_official 324:406fd2029f23 576
mbed_official 324:406fd2029f23 577 /*!
mbed_official 324:406fd2029f23 578 * @brief Switches to enable the pulse-out trigger.
mbed_official 324:406fd2029f23 579 *
mbed_official 324:406fd2029f23 580 * This function switches to enable the pulse-out trigger.
mbed_official 324:406fd2029f23 581 *
mbed_official 324:406fd2029f23 582 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 583 * @param pulseChn Pulse-out channle index for trigger.
mbed_official 324:406fd2029f23 584 * @param enable Switcher to assert the feature.
mbed_official 324:406fd2029f23 585 */
mbed_official 324:406fd2029f23 586 void PDB_HAL_SetPulseOutCmd(uint32_t baseAddr, uint32_t pulseChn, bool enable);
mbed_official 324:406fd2029f23 587
mbed_official 324:406fd2029f23 588 /*!
mbed_official 324:406fd2029f23 589 * @brief Sets the counter delay value for the pulse-out goes high.
mbed_official 324:406fd2029f23 590 *
mbed_official 324:406fd2029f23 591 * This function sets the counter delay value for the pulse-out goes high.
mbed_official 324:406fd2029f23 592 *
mbed_official 324:406fd2029f23 593 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 594 * @param pulseChn Pulse-out channel index for trigger.
mbed_official 324:406fd2029f23 595 * @param value Setting value for PDB delay .
mbed_official 324:406fd2029f23 596 */
mbed_official 324:406fd2029f23 597 static inline void PDB_HAL_SetPulseOutDelayForHigh(uint32_t baseAddr, uint32_t pulseChn, uint32_t value)
mbed_official 324:406fd2029f23 598 {
mbed_official 324:406fd2029f23 599 assert(pulseChn < HW_PDB_POnDLY_COUNT);
mbed_official 324:406fd2029f23 600 BW_PDB_POnDLY_DLY1(baseAddr, pulseChn, value);
mbed_official 324:406fd2029f23 601 }
mbed_official 324:406fd2029f23 602
mbed_official 324:406fd2029f23 603 /*!
mbed_official 324:406fd2029f23 604 * @brief Sets the counter delay value for the pulse-out goes low.
mbed_official 324:406fd2029f23 605 *
mbed_official 324:406fd2029f23 606 * This function sets the counter delay value for the pulse-out goes low.
mbed_official 324:406fd2029f23 607 *
mbed_official 324:406fd2029f23 608 * @param baseAddr Register base address for the module.
mbed_official 324:406fd2029f23 609 * @param pulseChn Pulse-out channel index for trigger.
mbed_official 324:406fd2029f23 610 * @param value Setting value for PDB delay .
mbed_official 324:406fd2029f23 611 */
mbed_official 324:406fd2029f23 612 static inline void PDB_HAL_SetPulseOutDelayForLow(uint32_t baseAddr, uint32_t pulseChn, uint32_t value)
mbed_official 324:406fd2029f23 613 {
mbed_official 324:406fd2029f23 614 assert(pulseChn < HW_PDB_POnDLY_COUNT);
mbed_official 324:406fd2029f23 615 BW_PDB_POnDLY_DLY2(baseAddr, pulseChn, value);
mbed_official 324:406fd2029f23 616 }
mbed_official 324:406fd2029f23 617
mbed_official 324:406fd2029f23 618 #if defined(__cplusplus)
mbed_official 432:9eff63c6c55a 619 }
mbed_official 324:406fd2029f23 620 #endif
mbed_official 324:406fd2029f23 621
mbed_official 324:406fd2029f23 622 /*!
mbed_official 324:406fd2029f23 623 * @}
mbed_official 324:406fd2029f23 624 */
mbed_official 324:406fd2029f23 625
mbed_official 324:406fd2029f23 626 #endif /* __FSL_PDB_HAL_H__ */
mbed_official 324:406fd2029f23 627
mbed_official 324:406fd2029f23 628 /******************************************************************************
mbed_official 324:406fd2029f23 629 * EOF
mbed_official 324:406fd2029f23 630 *****************************************************************************/
mbed_official 324:406fd2029f23 631