11#include "fsl_common.h"
25#define FSL_PIT_DRIVER_VERSION (MAKE_VERSION(2, 0, 4))
70#if defined(__cplusplus)
110 config->enableRunInDebug =
false;
113#if defined(FSL_FEATURE_PIT_HAS_CHAIN_MODE) && FSL_FEATURE_PIT_HAS_CHAIN_MODE
130static inline void PIT_SetTimerChainMode(
PIT_Type *base,
pit_chnl_t channel,
bool enable)
134 base->CHANNEL[channel].TCTRL |= PIT_TCTRL_CHN_MASK;
138 base->CHANNEL[channel].TCTRL &= ~PIT_TCTRL_CHN_MASK;
159static inline void PIT_EnableInterrupts(
PIT_Type *base,
pit_chnl_t channel, uint32_t mask)
161 base->CHANNEL[channel].TCTRL |= mask;
172static inline void PIT_DisableInterrupts(
PIT_Type *base,
pit_chnl_t channel, uint32_t mask)
174 base->CHANNEL[channel].TCTRL &= ~mask;
188 return (base->CHANNEL[channel].TCTRL & PIT_TCTRL_TIE_MASK);
209 return (base->CHANNEL[channel].TFLG & PIT_TFLG_TIF_MASK);
220static inline void PIT_ClearStatusFlags(
PIT_Type *base,
pit_chnl_t channel, uint32_t mask)
222 base->CHANNEL[channel].TFLG = mask;
246static inline void PIT_SetTimerPeriod(
PIT_Type *base,
pit_chnl_t channel, uint32_t count)
250 base->CHANNEL[channel].LDVAL = count - 1U;
268 return base->CHANNEL[channel].CVAL;
290 base->CHANNEL[channel].TCTRL |= PIT_TCTRL_TEN_MASK;
304 base->CHANNEL[channel].TCTRL &= ~PIT_TCTRL_TEN_MASK;
309#if defined(FSL_FEATURE_PIT_HAS_LIFETIME_TIMER) && FSL_FEATURE_PIT_HAS_LIFETIME_TIMER
324uint64_t PIT_GetLifetimeTimerCount(
PIT_Type *base);
328#if defined(__cplusplus)
#define NULL
Requests a GPIO pin group configuration.
Definition: xil_types.h:54
_pit_chnl
List of PIT channels.
Definition: fsl_pit.h:33
enum _pit_chnl pit_chnl_t
List of PIT channels.
void PIT_Deinit(PIT_Type *base)
Gates the PIT clock and disables the PIT module.
Definition: fsl_pit.c:106
struct _pit_config pit_config_t
PIT configuration structure.
_pit_interrupt_enable
List of PIT interrupts.
Definition: fsl_pit.h:42
void PIT_Init(PIT_Type *base, const pit_config_t *config)
Ungates the PIT clock, enables the PIT module, and configures the peripheral for basic operations.
Definition: fsl_pit.c:68
enum _pit_status_flags pit_status_flags_t
List of PIT status flags.
_pit_status_flags
List of PIT status flags.
Definition: fsl_pit.h:48
enum _pit_interrupt_enable pit_interrupt_enable_t
List of PIT interrupts.
@ kPIT_Chnl_3
Definition: fsl_pit.h:37
@ kPIT_Chnl_0
Definition: fsl_pit.h:34
@ kPIT_Chnl_1
Definition: fsl_pit.h:35
@ kPIT_Chnl_2
Definition: fsl_pit.h:36
@ kPIT_TimerInterruptEnable
Definition: fsl_pit.h:43
@ kPIT_TimerFlag
Definition: fsl_pit.h:49
Definition: MIMXRT1052.h:33298
PIT configuration structure.
Definition: fsl_pit.h:62
bool enableRunInDebug
Definition: fsl_pit.h:63
Definition: deflate.c:114