115 #if defined(__cplusplus)
150 uint32_t tmp = base->
CSR;
154 return ((tmp == 1u) ?
true :
false);
178 uint32_t tmp = base->
CSR;
203 uint32_t tmp = base -> CSR;
206 return ((tmp == 1u) ?
true :
false);
223 uint32_t tmp = base->
CSR;
250 uint32_t tmp = base->
CSR;
253 return ((tmp == 1u) ?
true :
false);
275 uint32_t tmp = base->
CSR;
301 uint32_t tmp = base->
CSR;
327 uint32_t tmp = base->
CSR;
352 uint32_t tmp = base->
CSR;
377 uint32_t tmp = base->
CSR;
402 uint32_t tmp = base->
CSR;
405 return ((tmp == 1u) ?
true :
false);
427 uint32_t tmp = base->
CSR;
452 uint32_t tmp = base->
CSR;
477 uint32_t tmp = base->
CSR;
501 uint32_t tmp = base->
CSR;
504 return ((tmp == 1u) ?
true :
false);
522 uint32_t tmp = base->
CSR;
543 uint32_t tmp = base->
CSR;
582 uint32_t tmp = base->
PSR;
620 uint32_t tmp = base->
PSR;
643 uint32_t tmp = base->
PSR;
646 return ((tmp == 1u) ?
true :
false);
668 uint32_t tmp = base->
PSR;
692 uint32_t tmp = base->
PSR;
718 uint32_t tmp = base->
PSR;
739 uint32_t tmp = base->
CMR;
741 return (uint16_t)(tmp);
758 const uint16_t compval)
762 uint32_t tmp = base->
CMR;
785 uint16_t cnr = (uint16_t)base->
CNR;
791 #if defined(__cplusplus)
#define LPTMR_CSR_TFC_MASK
void LPTMR_HAL_Init(LPTMR_Type *const base)
Initialize the LPTMR instance to reset values.
#define LPTMR_PSR_PRESCALE(x)
lptmr_pinselect_t
Pulse Counter Input selection Implements : lptmr_pinselect_t_Class.
#define LPTMR_PSR_PCS_MASK
#define LPTMR_CMR_COMPARE(x)
#define LPTMR_PSR_PRESCALE_SHIFT
static void LPTMR_HAL_SetPinSelect(LPTMR_Type *const base, const lptmr_pinselect_t pinsel)
Configure the Pin selection for Pulse Counter Mode.
#define LPTMR_CMR_COMPARE_SHIFT
static lptmr_pinselect_t LPTMR_HAL_GetPinSelect(const LPTMR_Type *const base)
Get the Pin select for Counter Mode.
#define LPTMR_CSR_TMS_SHIFT
#define LPTMR_CSR_TCF_SHIFT
static lptmr_prescaler_t LPTMR_HAL_GetPrescaler(const LPTMR_Type *const base)
Get Prescaler/Glitch Filter divider value.
#define LPTMR_CSR_TDRE_SHIFT
#define LPTMR_CSR_TPS_SHIFT
#define LPTMR_CMR_COMPARE_MASK
static bool LPTMR_HAL_GetEnable(const LPTMR_Type *const base)
Get the Enable state.
static lptmr_pinpolarity_t LPTMR_HAL_GetPinPolarity(const LPTMR_Type *const base)
Get Pin Polarity for Pulse Counter Mode.
lptmr_clocksource_t
Clock Source selection Implements : lptmr_clocksource_t_Class.
static void LPTMR_HAL_SetBypass(LPTMR_Type *const base, const bool enable)
Configure the Prescaler/Glitch Filter Bypass enable state.
#define LPTMR_PSR_PRESCALE_MASK
#define LPTMR_CSR_TFC_SHIFT
#define LPTMR_PSR_PBYP_SHIFT
static void LPTMR_HAL_SetPinPolarity(LPTMR_Type *const base, const lptmr_pinpolarity_t pol)
Configure Pin Polarity for Pulse Counter Mode.
static void LPTMR_HAL_ClearCompareFlag(LPTMR_Type *const base)
Clear the Compare Flag.
lptmr_pinpolarity_t
Pulse Counter input polarity Implements : lptmr_pinpolarity_t_Class.
static bool LPTMR_HAL_GetDmaRequest(const LPTMR_Type *const base)
Get the DMA Request Enable Flag.
#define LPTMR_CSR_TDRE_MASK
static void LPTMR_HAL_SetWorkMode(LPTMR_Type *const base, const lptmr_workmode_t mode)
Configure the Work Mode.
static void LPTMR_HAL_SetDmaRequest(LPTMR_Type *const base, bool enable)
Configure the DMA Request Enable Flag state.
static uint16_t LPTMR_HAL_GetCounterValue(LPTMR_Type *const base)
Get the current Counter Value.
#define LPTMR_CSR_TMS_MASK
static void LPTMR_HAL_Disable(LPTMR_Type *const base)
Disable the LPTMR.
static void LPTMR_HAL_Enable(LPTMR_Type *const base)
Enable the LPTMR.
#define LPTMR_CSR_TIE_MASK
lptmr_workmode_t
Work Mode Implements : lptmr_workmode_t_Class.
#define LPTMR_PSR_PBYP(x)
static void LPTMR_HAL_SetCompareValue(LPTMR_Type *const base, const uint16_t compval)
Configure the Compare Value.
static void LPTMR_HAL_SetFreeRunning(LPTMR_Type *const base, const bool enable)
Configure the Free Running state.
static bool LPTMR_HAL_GetBypass(const LPTMR_Type *const base)
Get the Prescaler/Glitch Filter Bypass enable state.
static void LPTMR_HAL_SetClockSelect(LPTMR_Type *const base, const lptmr_clocksource_t clocksel)
Configure the LPTMR input Clock selection.
static bool LPTMR_HAL_GetCompareFlag(const LPTMR_Type *const base)
Get the Compare Flag state.
static lptmr_clocksource_t LPTMR_HAL_GetClockSelect(const LPTMR_Type *const base)
Get the LPTMR input Clock selection.
static void LPTMR_HAL_SetPrescaler(LPTMR_Type *const base, const lptmr_prescaler_t presc)
Configure the Prescaler/Glitch Filter divider value.
#define LPTMR_CSR_TPP_MASK
#define LPTMR_CSR_TIE_SHIFT
#define LPTMR_CSR_TCF_MASK
lptmr_prescaler_t
Prescaler Selection Implements : lptmr_prescaler_t_Class.
#define LPTMR_CNR_COUNTER(x)
#define LPTMR_CSR_TDRE(x)
#define LPTMR_CSR_TEN_MASK
static bool LPTMR_HAL_GetFreeRunning(const LPTMR_Type *const base)
Get the Free Running state.
static void LPTMR_HAL_SetInterrupt(LPTMR_Type *const base, bool enable)
Configure the Interrupt Enable state.
#define LPTMR_PSR_PCS_SHIFT
#define LPTMR_CSR_TEN_SHIFT
#define LPTMR_PSR_PBYP_MASK
#define LPTMR_CSR_TPP_SHIFT
static uint16_t LPTMR_HAL_GetCompareValue(const LPTMR_Type *const base)
Get the Compare Value.
#define LPTMR_CSR_TPS_MASK
static lptmr_workmode_t LPTMR_HAL_GetWorkMode(const LPTMR_Type *const base)
Get current Work Mode.
static bool LPTMR_HAL_GetInterruptEnable(const LPTMR_Type *const base)
Get the Interrupt Enable state.