test

Committer:
elijahsj
Date:
Mon Nov 09 00:02:47 2020 -0500
Revision:
1:8a094db1347f
test

Who changed what in which revision?

UserRevisionLine numberNew contents of line
elijahsj 1:8a094db1347f 1 /**
elijahsj 1:8a094db1347f 2 * @file
elijahsj 1:8a094db1347f 3 * @brief Pulse Train data types, definitions and function prototypes.
elijahsj 1:8a094db1347f 4 */
elijahsj 1:8a094db1347f 5
elijahsj 1:8a094db1347f 6 /* *****************************************************************************
elijahsj 1:8a094db1347f 7 * Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved.
elijahsj 1:8a094db1347f 8 *
elijahsj 1:8a094db1347f 9 * Permission is hereby granted, free of charge, to any person obtaining a
elijahsj 1:8a094db1347f 10 * copy of this software and associated documentation files (the "Software"),
elijahsj 1:8a094db1347f 11 * to deal in the Software without restriction, including without limitation
elijahsj 1:8a094db1347f 12 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
elijahsj 1:8a094db1347f 13 * and/or sell copies of the Software, and to permit persons to whom the
elijahsj 1:8a094db1347f 14 * Software is furnished to do so, subject to the following conditions:
elijahsj 1:8a094db1347f 15 *
elijahsj 1:8a094db1347f 16 * The above copyright notice and this permission notice shall be included
elijahsj 1:8a094db1347f 17 * in all copies or substantial portions of the Software.
elijahsj 1:8a094db1347f 18 *
elijahsj 1:8a094db1347f 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
elijahsj 1:8a094db1347f 20 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
elijahsj 1:8a094db1347f 21 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
elijahsj 1:8a094db1347f 22 * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
elijahsj 1:8a094db1347f 23 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
elijahsj 1:8a094db1347f 24 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
elijahsj 1:8a094db1347f 25 * OTHER DEALINGS IN THE SOFTWARE.
elijahsj 1:8a094db1347f 26 *
elijahsj 1:8a094db1347f 27 * Except as contained in this notice, the name of Maxim Integrated
elijahsj 1:8a094db1347f 28 * Products, Inc. shall not be used except as stated in the Maxim Integrated
elijahsj 1:8a094db1347f 29 * Products, Inc. Branding Policy.
elijahsj 1:8a094db1347f 30 *
elijahsj 1:8a094db1347f 31 * The mere transfer of this software does not imply any licenses
elijahsj 1:8a094db1347f 32 * of trade secrets, proprietary technology, copyrights, patents,
elijahsj 1:8a094db1347f 33 * trademarks, maskwork rights, or any other form of intellectual
elijahsj 1:8a094db1347f 34 * property whatsoever. Maxim Integrated Products, Inc. retains all
elijahsj 1:8a094db1347f 35 * ownership rights.
elijahsj 1:8a094db1347f 36 *
elijahsj 1:8a094db1347f 37 * $Date: 2016-10-10 19:27:24 -0500 (Mon, 10 Oct 2016) $
elijahsj 1:8a094db1347f 38 * $Revision: 24669 $
elijahsj 1:8a094db1347f 39 *
elijahsj 1:8a094db1347f 40 ***************************************************************************** */
elijahsj 1:8a094db1347f 41
elijahsj 1:8a094db1347f 42 /* Define to prevent redundant inclusion */
elijahsj 1:8a094db1347f 43 #ifndef _PT_H_
elijahsj 1:8a094db1347f 44 #define _PT_H_
elijahsj 1:8a094db1347f 45
elijahsj 1:8a094db1347f 46 /* **** Includes **** */
elijahsj 1:8a094db1347f 47 #include "mxc_config.h"
elijahsj 1:8a094db1347f 48 #include "pt_regs.h"
elijahsj 1:8a094db1347f 49 #include "mxc_assert.h"
elijahsj 1:8a094db1347f 50 #include "mxc_sys.h"
elijahsj 1:8a094db1347f 51
elijahsj 1:8a094db1347f 52 #ifdef __cplusplus
elijahsj 1:8a094db1347f 53 extern "C" {
elijahsj 1:8a094db1347f 54 #endif
elijahsj 1:8a094db1347f 55
elijahsj 1:8a094db1347f 56 /**
elijahsj 1:8a094db1347f 57 * @ingroup periphlibs
elijahsj 1:8a094db1347f 58 * @defgroup pulsetrain Pulse Train Engine
elijahsj 1:8a094db1347f 59 * @brief This is the high level API for the pulse train engine.
elijahsj 1:8a094db1347f 60 * @{
elijahsj 1:8a094db1347f 61 */
elijahsj 1:8a094db1347f 62
elijahsj 1:8a094db1347f 63 /**
elijahsj 1:8a094db1347f 64 * Structure type for pulse train mode configuration.
elijahsj 1:8a094db1347f 65 * @note Do not use for square wave
elijahsj 1:8a094db1347f 66 */
elijahsj 1:8a094db1347f 67 typedef struct {
elijahsj 1:8a094db1347f 68 uint32_t bps; /**< pulse train bit rate */
elijahsj 1:8a094db1347f 69 uint32_t pattern; /**< Output pattern to shift out, starts at LSB */
elijahsj 1:8a094db1347f 70 uint8_t ptLength; /**< Number of bits in pulse train, 0 = 32bits, 1 = non valid , 2 = 2 bits, ... */
elijahsj 1:8a094db1347f 71 uint16_t loop; /**< Number of times to repeat the train, 0 = continuous */
elijahsj 1:8a094db1347f 72 uint16_t loopDelay; /**< Delay between loops specified in bits Example: loopDelay = 4, delays time = time it takes to shift out 4 bits */
elijahsj 1:8a094db1347f 73 } pt_pt_cfg_t;
elijahsj 1:8a094db1347f 74
elijahsj 1:8a094db1347f 75 /**
elijahsj 1:8a094db1347f 76 * @brief This function initializes the pulse trains to a known stopped
elijahsj 1:8a094db1347f 77 * state and sets the global PT clock scale.
elijahsj 1:8a094db1347f 78 * @param clk_scale Scale the system clock for the global PT clock.
elijahsj 1:8a094db1347f 79 */
elijahsj 1:8a094db1347f 80 void PT_Init(sys_pt_clk_scale clk_scale);
elijahsj 1:8a094db1347f 81
elijahsj 1:8a094db1347f 82 /**
elijahsj 1:8a094db1347f 83 * @brief Configures the pulse train in the specified mode.
elijahsj 1:8a094db1347f 84 * @details The parameters in the config structure must be set before calling
elijahsj 1:8a094db1347f 85 * this function. This function should be used for configuring pulse
elijahsj 1:8a094db1347f 86 * train mode only.
elijahsj 1:8a094db1347f 87 * @note The pulse train cannot be running when this function is called.
elijahsj 1:8a094db1347f 88 *
elijahsj 1:8a094db1347f 89 * @param pt Pulse train to operate on.
elijahsj 1:8a094db1347f 90 * @param cfg Pointer to pulse train configuration.
elijahsj 1:8a094db1347f 91 * @param sysCfg Pointer to pulse train system GPIO configuration.
elijahsj 1:8a094db1347f 92 *
elijahsj 1:8a094db1347f 93 * @return #E_NO_ERROR if everything is successful, @ref MXC_Error_Codes
elijahsj 1:8a094db1347f 94 * "error" if unsuccessful.
elijahsj 1:8a094db1347f 95 */
elijahsj 1:8a094db1347f 96 int PT_PTConfig(mxc_pt_regs_t *pt, pt_pt_cfg_t *cfg, const sys_cfg_pt_t *sysCfg);
elijahsj 1:8a094db1347f 97
elijahsj 1:8a094db1347f 98 /**
elijahsj 1:8a094db1347f 99 * @brief Configures the pulse train in the square wave mode.
elijahsj 1:8a094db1347f 100 * @details This function should be used for configuring square wave mode only.
elijahsj 1:8a094db1347f 101 * @note The pulse train cannot be running when this function is called
elijahsj 1:8a094db1347f 102 *
elijahsj 1:8a094db1347f 103 * @param pt pulse train to operate on
elijahsj 1:8a094db1347f 104 * @param freq square wave output frequency in Hz
elijahsj 1:8a094db1347f 105 * @param sysCfg pointer to pulse train system GPIO configuration
elijahsj 1:8a094db1347f 106 *
elijahsj 1:8a094db1347f 107 * @returns #E_NO_ERROR if everything is successful, \ref MXC_Error_Codes "error" if unsuccessful.
elijahsj 1:8a094db1347f 108 */
elijahsj 1:8a094db1347f 109 int PT_SqrWaveConfig(mxc_pt_regs_t *pt, uint32_t freq, const sys_cfg_pt_t *sysCfg);
elijahsj 1:8a094db1347f 110
elijahsj 1:8a094db1347f 111 /**
elijahsj 1:8a094db1347f 112 * @brief Starts the pulse train specified.
elijahsj 1:8a094db1347f 113 *
elijahsj 1:8a094db1347f 114 * @param pt Pulse train to operate on.
elijahsj 1:8a094db1347f 115 */
elijahsj 1:8a094db1347f 116 __STATIC_INLINE void PT_Start(mxc_pt_regs_t *pt)
elijahsj 1:8a094db1347f 117 {
elijahsj 1:8a094db1347f 118 int ptIndex = MXC_PT_GET_IDX(pt);
elijahsj 1:8a094db1347f 119
elijahsj 1:8a094db1347f 120 MXC_PTG->enable |= (1 << ptIndex);
elijahsj 1:8a094db1347f 121
elijahsj 1:8a094db1347f 122 //wait for PT to start
elijahsj 1:8a094db1347f 123 while( (MXC_PTG->enable & (1 << ptIndex)) == 0 );
elijahsj 1:8a094db1347f 124 }
elijahsj 1:8a094db1347f 125
elijahsj 1:8a094db1347f 126 /**
elijahsj 1:8a094db1347f 127 * @brief Start multiple pulse train modules together.
elijahsj 1:8a094db1347f 128 *
elijahsj 1:8a094db1347f 129 * @param pts Set the bits of pulse trains to start
elijahsj 1:8a094db1347f 130 * Bit0-\>pt0, Bit1-\>pt1... etc.
elijahsj 1:8a094db1347f 131 */
elijahsj 1:8a094db1347f 132 __STATIC_INLINE void PT_StartMulti(uint32_t pts)
elijahsj 1:8a094db1347f 133 {
elijahsj 1:8a094db1347f 134 MXC_PTG->enable |= pts;
elijahsj 1:8a094db1347f 135
elijahsj 1:8a094db1347f 136 //wait for PTs to start
elijahsj 1:8a094db1347f 137 while( (MXC_PTG->enable & pts) != pts );
elijahsj 1:8a094db1347f 138 }
elijahsj 1:8a094db1347f 139
elijahsj 1:8a094db1347f 140 /**
elijahsj 1:8a094db1347f 141 * @brief Stops a pulse train.
elijahsj 1:8a094db1347f 142 *
elijahsj 1:8a094db1347f 143 * @param pt Pulse train to operate on.
elijahsj 1:8a094db1347f 144 */
elijahsj 1:8a094db1347f 145 __STATIC_INLINE void PT_Stop(mxc_pt_regs_t *pt)
elijahsj 1:8a094db1347f 146 {
elijahsj 1:8a094db1347f 147 int ptIndex = MXC_PT_GET_IDX(pt);
elijahsj 1:8a094db1347f 148
elijahsj 1:8a094db1347f 149 MXC_PTG->enable &= ~(1 << ptIndex);
elijahsj 1:8a094db1347f 150 }
elijahsj 1:8a094db1347f 151
elijahsj 1:8a094db1347f 152 /**
elijahsj 1:8a094db1347f 153 * @brief Stop multiple pulse trains together
elijahsj 1:8a094db1347f 154 *
elijahsj 1:8a094db1347f 155 * @param pts Set the bits of pulse trains to stop
elijahsj 1:8a094db1347f 156 * Bit0-\>pt0, Bit1-\>pt1... etc.
elijahsj 1:8a094db1347f 157 */
elijahsj 1:8a094db1347f 158 __STATIC_INLINE void PT_StopMulti(uint32_t pts)
elijahsj 1:8a094db1347f 159 {
elijahsj 1:8a094db1347f 160 MXC_PTG->enable &= ~(pts);
elijahsj 1:8a094db1347f 161 }
elijahsj 1:8a094db1347f 162
elijahsj 1:8a094db1347f 163 /**
elijahsj 1:8a094db1347f 164 * @brief Determines if the pulse train is running.
elijahsj 1:8a094db1347f 165 *
elijahsj 1:8a094db1347f 166 * @param pt Pulse train to operate on.
elijahsj 1:8a094db1347f 167 *
elijahsj 1:8a094db1347f 168 * @return 0 Pulse train is off.
elijahsj 1:8a094db1347f 169 * @return \>0 Pulse train is on.
elijahsj 1:8a094db1347f 170 */
elijahsj 1:8a094db1347f 171 __STATIC_INLINE uint32_t PT_IsActive(mxc_pt_regs_t *pt)
elijahsj 1:8a094db1347f 172 {
elijahsj 1:8a094db1347f 173 int ptIndex = MXC_PT_GET_IDX(pt);
elijahsj 1:8a094db1347f 174
elijahsj 1:8a094db1347f 175 return (!!(MXC_PTG->enable & (1 << ptIndex)));
elijahsj 1:8a094db1347f 176 }
elijahsj 1:8a094db1347f 177
elijahsj 1:8a094db1347f 178 /**
elijahsj 1:8a094db1347f 179 * @brief Determines if the pulse trains selected are running
elijahsj 1:8a094db1347f 180 *
elijahsj 1:8a094db1347f 181 * @param pts Set the bits of pulse trains to check Bit0-\>pt0,
elijahsj 1:8a094db1347f 182 * Bit1-\>pt1... etc.
elijahsj 1:8a094db1347f 183 *
elijahsj 1:8a094db1347f 184 * @return 0 All pulse trains are off.
elijahsj 1:8a094db1347f 185 * @return \>0 At least one pulse train is on.
elijahsj 1:8a094db1347f 186 */
elijahsj 1:8a094db1347f 187 __STATIC_INLINE uint32_t PT_IsActiveMulti(uint32_t pts)
elijahsj 1:8a094db1347f 188 {
elijahsj 1:8a094db1347f 189 return (MXC_PTG->enable & pts);
elijahsj 1:8a094db1347f 190 }
elijahsj 1:8a094db1347f 191
elijahsj 1:8a094db1347f 192 /**
elijahsj 1:8a094db1347f 193 * @brief Sets the pattern of the pulse train
elijahsj 1:8a094db1347f 194 *
elijahsj 1:8a094db1347f 195 * @param pt Pointer to pulse train to operate on
elijahsj 1:8a094db1347f 196 * @param pattern Output pattern.
elijahsj 1:8a094db1347f 197 *
elijahsj 1:8a094db1347f 198 */
elijahsj 1:8a094db1347f 199 __STATIC_INLINE void PT_SetPattern(mxc_pt_regs_t *pt, uint32_t pattern)
elijahsj 1:8a094db1347f 200 {
elijahsj 1:8a094db1347f 201 pt->train = pattern;
elijahsj 1:8a094db1347f 202 }
elijahsj 1:8a094db1347f 203
elijahsj 1:8a094db1347f 204 /**
elijahsj 1:8a094db1347f 205 * @brief Enable pulse train interrupt.
elijahsj 1:8a094db1347f 206 *
elijahsj 1:8a094db1347f 207 * @param pt Pointer to pulse train to operate on.
elijahsj 1:8a094db1347f 208 */
elijahsj 1:8a094db1347f 209 __STATIC_INLINE void PT_EnableINT(mxc_pt_regs_t *pt)
elijahsj 1:8a094db1347f 210 {
elijahsj 1:8a094db1347f 211 int ptIndex = MXC_PT_GET_IDX(pt);
elijahsj 1:8a094db1347f 212
elijahsj 1:8a094db1347f 213 MXC_PTG->inten |= (1 << ptIndex);
elijahsj 1:8a094db1347f 214 }
elijahsj 1:8a094db1347f 215
elijahsj 1:8a094db1347f 216 /**
elijahsj 1:8a094db1347f 217 * @brief Enable interrupts for the pulse trains selected.
elijahsj 1:8a094db1347f 218 *
elijahsj 1:8a094db1347f 219 * @param pts Bit mask of which pulse trains to enable. Set the bit
elijahsj 1:8a094db1347f 220 * position of each pulse train to enable it. Bit0-\>pt0,
elijahsj 1:8a094db1347f 221 * Bit1-\>pt1... etc, 1 will enable the interrupt, 0 to leave
elijahsj 1:8a094db1347f 222 * a PT channel in its current state.
elijahsj 1:8a094db1347f 223 */
elijahsj 1:8a094db1347f 224 __STATIC_INLINE void PT_EnableINTMulti(uint32_t pts)
elijahsj 1:8a094db1347f 225 {
elijahsj 1:8a094db1347f 226 MXC_PTG->inten |= pts;
elijahsj 1:8a094db1347f 227 }
elijahsj 1:8a094db1347f 228
elijahsj 1:8a094db1347f 229 /**
elijahsj 1:8a094db1347f 230 * @brief Disable pulse train interrupt.
elijahsj 1:8a094db1347f 231 *
elijahsj 1:8a094db1347f 232 * @param pt pulse train to operate on.
elijahsj 1:8a094db1347f 233 */
elijahsj 1:8a094db1347f 234 __STATIC_INLINE void PT_DisableINT(mxc_pt_regs_t *pt)
elijahsj 1:8a094db1347f 235 {
elijahsj 1:8a094db1347f 236 int ptIndex = MXC_PT_GET_IDX(pt);
elijahsj 1:8a094db1347f 237
elijahsj 1:8a094db1347f 238 MXC_PTG->inten &= ~(1 << ptIndex);
elijahsj 1:8a094db1347f 239 }
elijahsj 1:8a094db1347f 240
elijahsj 1:8a094db1347f 241 /**
elijahsj 1:8a094db1347f 242 * @brief Disable interrupts for the pulse trains selected.
elijahsj 1:8a094db1347f 243 *
elijahsj 1:8a094db1347f 244 * @param pts Bit mask of what pulse trains to disable. Set the bit
elijahsj 1:8a094db1347f 245 * position of each pulse train to disable it. Bit0-\>pt0,
elijahsj 1:8a094db1347f 246 * Bit1-\>pt1... etc, 1 will disable the interrupt, 0 to leave
elijahsj 1:8a094db1347f 247 * a PT channel in its current state.
elijahsj 1:8a094db1347f 248 */
elijahsj 1:8a094db1347f 249 __STATIC_INLINE void PT_DisableINTMulti(uint32_t pts)
elijahsj 1:8a094db1347f 250 {
elijahsj 1:8a094db1347f 251 MXC_PTG->inten &= ~pts;
elijahsj 1:8a094db1347f 252 }
elijahsj 1:8a094db1347f 253 /**
elijahsj 1:8a094db1347f 254 * @brief Gets the pulse trains's interrupt flags.
elijahsj 1:8a094db1347f 255 *
elijahsj 1:8a094db1347f 256 * @return The Pulse Train Interrupt Flags, \ref PT_INTFL_Register Register
elijahsj 1:8a094db1347f 257 * for details.
elijahsj 1:8a094db1347f 258 */
elijahsj 1:8a094db1347f 259 __STATIC_INLINE uint32_t PT_GetFlags(void)
elijahsj 1:8a094db1347f 260 {
elijahsj 1:8a094db1347f 261 return MXC_PTG->intfl;
elijahsj 1:8a094db1347f 262 }
elijahsj 1:8a094db1347f 263
elijahsj 1:8a094db1347f 264 /**
elijahsj 1:8a094db1347f 265 * @brief Clears the pulse train's interrupt flag.
elijahsj 1:8a094db1347f 266 *
elijahsj 1:8a094db1347f 267 * @param mask bits to clear, see \ref PT_INTFL_Register Register for details.
elijahsj 1:8a094db1347f 268 */
elijahsj 1:8a094db1347f 269 __STATIC_INLINE void PT_ClearFlags(uint32_t mask)
elijahsj 1:8a094db1347f 270 {
elijahsj 1:8a094db1347f 271 MXC_PTG->intfl = mask;
elijahsj 1:8a094db1347f 272 }
elijahsj 1:8a094db1347f 273
elijahsj 1:8a094db1347f 274 /**
elijahsj 1:8a094db1347f 275 * @brief Setup and enables a pulse train to restart after another pulse
elijahsj 1:8a094db1347f 276 * train has exited its loop. Each pulse train can have up to two
elijahsj 1:8a094db1347f 277 * restart triggers.
elijahsj 1:8a094db1347f 278 *
elijahsj 1:8a094db1347f 279 * @param ptToRestart pulse train to restart after @c ptStop ends.
elijahsj 1:8a094db1347f 280 * @param ptStop pulse train that stops and triggers @p ptToRestart
elijahsj 1:8a094db1347f 281 * to begin.
elijahsj 1:8a094db1347f 282 * @param restartIndex selects which restart trigger to set (0 or 1).
elijahsj 1:8a094db1347f 283 */
elijahsj 1:8a094db1347f 284 __STATIC_INLINE void PT_SetRestart(mxc_pt_regs_t *ptToRestart, mxc_pt_regs_t *ptStop, uint8_t restartIndex)
elijahsj 1:8a094db1347f 285 {
elijahsj 1:8a094db1347f 286 int ptStopIndex = MXC_PT_GET_IDX(ptStop);
elijahsj 1:8a094db1347f 287
elijahsj 1:8a094db1347f 288 MXC_ASSERT(ptStopIndex >= 0);
elijahsj 1:8a094db1347f 289
elijahsj 1:8a094db1347f 290 if(restartIndex) {
elijahsj 1:8a094db1347f 291 ptToRestart->restart |= (ptStopIndex << MXC_F_PT_RESTART_PT_Y_SELECT_POS) |
elijahsj 1:8a094db1347f 292 MXC_F_PT_RESTART_ON_PT_Y_LOOP_EXIT;
elijahsj 1:8a094db1347f 293 } else {
elijahsj 1:8a094db1347f 294 ptToRestart->restart |= (ptStopIndex << MXC_F_PT_RESTART_PT_X_SELECT_POS) |
elijahsj 1:8a094db1347f 295 MXC_F_PT_RESTART_ON_PT_X_LOOP_EXIT;
elijahsj 1:8a094db1347f 296 }
elijahsj 1:8a094db1347f 297 }
elijahsj 1:8a094db1347f 298
elijahsj 1:8a094db1347f 299 /**
elijahsj 1:8a094db1347f 300 * @brief Disable the restart for the specified pulse train
elijahsj 1:8a094db1347f 301 *
elijahsj 1:8a094db1347f 302 * @param ptToRestart pulse train to disable the restart
elijahsj 1:8a094db1347f 303 * @param restartIndex selects which restart trigger to disable (0 or 1)
elijahsj 1:8a094db1347f 304 */
elijahsj 1:8a094db1347f 305 __STATIC_INLINE void PT_RestartDisable(mxc_pt_regs_t *ptToRestart, uint8_t restartIndex)
elijahsj 1:8a094db1347f 306 {
elijahsj 1:8a094db1347f 307 if(restartIndex)
elijahsj 1:8a094db1347f 308 ptToRestart->restart &= ~MXC_F_PT_RESTART_ON_PT_Y_LOOP_EXIT;
elijahsj 1:8a094db1347f 309 else
elijahsj 1:8a094db1347f 310 ptToRestart->restart &= ~MXC_F_PT_RESTART_ON_PT_X_LOOP_EXIT;
elijahsj 1:8a094db1347f 311 }
elijahsj 1:8a094db1347f 312
elijahsj 1:8a094db1347f 313 /**
elijahsj 1:8a094db1347f 314 * @brief Resynchronize individual pulse trains together. Resync will stop
elijahsj 1:8a094db1347f 315 * those resync_pts; others will be still running
elijahsj 1:8a094db1347f 316 *
elijahsj 1:8a094db1347f 317 * @param resyncPts pulse train modules that need to be re-synced by bit
elijahsj 1:8a094db1347f 318 * number. Bit0-\>pt0, Bit1-\>pt1... etc.
elijahsj 1:8a094db1347f 319 */
elijahsj 1:8a094db1347f 320 __STATIC_INLINE void PT_Resync(uint32_t resyncPts)
elijahsj 1:8a094db1347f 321 {
elijahsj 1:8a094db1347f 322 MXC_PTG->resync = resyncPts;
elijahsj 1:8a094db1347f 323 while(MXC_PTG->resync);
elijahsj 1:8a094db1347f 324 }
elijahsj 1:8a094db1347f 325 /**@} end of group pulsetrains*/
elijahsj 1:8a094db1347f 326
elijahsj 1:8a094db1347f 327 #ifdef __cplusplus
elijahsj 1:8a094db1347f 328 }
elijahsj 1:8a094db1347f 329 #endif
elijahsj 1:8a094db1347f 330
elijahsj 1:8a094db1347f 331 #endif /* _PT_H_ */