44#ifndef G32R4xx_DDL_LPTMR_H
45#define G32R4xx_DDL_LPTMR_H
69#if defined(USE_FULL_DDL_DRIVER)
106#define DDL_LPTMR_STS_RUF LPTMR_SR_RU
107#define DDL_LPTMR_STS_PUF LPTMR_SR_PU
108#define DDL_LPTMR_STS_WKF LPTMR_SR_WK_STS
117#define DDL_LPTMR_INT_WKEN LPTMR_CR_IREN
137#define DDL_LPTMR_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG((__INSTANCE__)->__REG__, (__VALUE__))
145#define DDL_LPTMR_ReadReg(__INSTANCE__, __REG__) READ_REG((__INSTANCE__)->__REG__)
166 SET_BIT(LPTMRx->CR, LPTMR_CR_EN);
176 CLEAR_BIT(LPTMRx->CR, LPTMR_CR_EN);
186 SET_BIT(PMU->CR, PMU_CR_LPTMRCEN);
196 CLEAR_BIT(PMU->CR, PMU_CR_LPTMRCEN);
208 WRITE_REG(LPTMRx->PSC, Prescaler);
218 return (uint32_t)(READ_REG(LPTMRx->PSC));
229 WRITE_REG(LPTMRx->WVR, Value);
241 return (uint32_t)(READ_REG(LPTMRx->WVR));
259 uint32_t regVal = READ_REG(LPTMRx->SR);
265 WRITE_REG(LPTMRx->SR, regVal);
330#if defined(USE_FULL_DDL_DRIVER)
#define DDL_LPTMR_STS_RUF
#define DDL_LPTMR_STS_PUF
#define DDL_LPTMR_STS_WKF
#define DDL_LPTMR_INT_WKEN
__STATIC_INLINE uint32_t DDL_LPTMR_IsActiveFlag_WakeUp(LPTMR_TypeDef *LPTMRx)
Indicate whether wake up interrupt flag (WKF) is set (wake up interrupt is pending).
__STATIC_INLINE uint32_t DDL_LPTMR_IsActiveFlag_PrescalerUpdate(LPTMR_TypeDef *LPTMRx)
Indicate whether prescaler update flag (PUF) is set.
__STATIC_INLINE uint32_t DDL_LPTMR_IsActiveFlag_ReloadUpdate(LPTMR_TypeDef *LPTMRx)
Indicate whether reload update flag (RUF) is set.
__STATIC_INLINE void DDL_LPTMR_ClearFlag_WakeUp(LPTMR_TypeDef *LPTMRx)
Clear wake-up flag (WKF) by writing 0.
__STATIC_INLINE void DDL_LPTMR_DisableIT_WakeUp(LPTMR_TypeDef *LPTMRx)
Disable wake up interrupt (WK).
__STATIC_INLINE void DDL_LPTMR_EnableIT_WakeUp(LPTMR_TypeDef *LPTMRx)
Enable wake up interrupt (WK).
void DDL_LPTMR_StructInit(DDL_LPTMR_InitTypeDef *LPTMR_InitStruct)
Set the fields of the time base unit configuration data structure to their default values.
ErrorStatus DDL_LPTMR_DeInit(LPTMR_TypeDef *LPTMRx)
Set LPTMRx registers to their reset values.
ErrorStatus DDL_LPTMR_Init(LPTMR_TypeDef *LPTMRx, DDL_LPTMR_InitTypeDef *LPTMR_InitStruct)
Configure the LPTMRx time base unit.
__STATIC_INLINE void DDL_LPTMR_SetPrescaler(LPTMR_TypeDef *LPTMRx, uint32_t Prescaler)
Set the prescaler value.
__STATIC_INLINE void DDL_LPTMR_Enable(LPTMR_TypeDef *LPTMRx)
Enable low power timer.
__STATIC_INLINE uint32_t DDL_LPTMR_GetWakeUpValue(LPTMR_TypeDef *LPTMRx)
Get the wake up value.
__STATIC_INLINE void DDL_LPTMR_Disable(LPTMR_TypeDef *LPTMRx)
Disable low power timer.
__STATIC_INLINE uint32_t DDL_LPTMR_GetPrescaler(LPTMR_TypeDef *LPTMRx)
Get the prescaler value.
__STATIC_INLINE void DDL_LPTMR_DisableClk(void)
Disable low power timer clock.
__STATIC_INLINE void DDL_LPTMR_SetWakeUpValue(LPTMR_TypeDef *LPTMRx, uint32_t Value)
Set the wake up value.
__STATIC_INLINE void DDL_LPTMR_EnableClk(void)
Enable low power timer clock.
LPTMR Time Base configuration structure definition.