WB32L003 Standard Peripherals Firmware Library

Modules | Data Structures | Functions
LPTIM
WB32L003_StdPeriph_Driver

LPTIM driver modules. More...

## Modules
| LPTIM_Exported_Constants
| LPTIM_Private_Functions

## Data Structures
struct | LPTIM_BaseInitTypeDef
| LPTIM Time base Configuration Structure definition. More...

## Functions
void | LPTIM_DeInit (void)
| Deinitializes the LPTIM peripheral registers to their default reset values. More...
void | LPTIM_BaseInit (LPTIM_BaseInitTypeDef *Base_InitStruct)
| Low Power Time base configuration. More...
void | LPTIM_TCKCmd (FunctionalState NewState)
| Enables or disables the LPTIM time clock. More...
void | LPTIM_Cmd (FunctionalState NewState)
| Enables or disables the LPTIM peripheral. More...
void | LPTIM_ITCmd (FunctionalState NewState)
| Enables or disables the LPTIM interrupt. More...
FlagStatus | LPTIM_GetFlagStatus (void)
| Checks whether the LPTIM interrupt flag is set or not. More...
ITStatus | LPTIM_GetITStatus (void)
| Checks whether the LPTIM interrupt is set or not. More...
void | LPTIM_ClearFlag (void)
| Clears the LPTIM pending interrupt flag. More...
void | LPTIM_ClearITPendingBit (void)
| Clears the LPTIM pending interrupt bit. More...
void | LPTIM_SetCounter (uint32_t Counter)
| Sets the LPTIM counter register value on runtime. More...
uint32_t | LPTIM_GetCounter (void)
| Gets LPTIM counter. More...
void | LPTIM_GateCmd (FunctionalState NewState)
| Enables or disables the LPTIM gate function. More...
void | LPTIM_ToggleCmd (FunctionalState NewState)
| Enables or disables the LPTIM toggle function. More...
void | LPTIM_SetGateLevel (uint32_t Level)
| Sets gate level high or low. More...
FlagStatus | LPTIM_GetSyncFlag (void)
| Waits for LPTIM WT sync finish. More...

## Detailed Description

LPTIM driver modules.

## Function Documentation

## ◆ LPTIM_BaseInit()

void LPTIM_BaseInit | ( | LPTIM_BaseInitTypeDef * | Base_InitStruct | ) |

Low Power Time base configuration.

Parameters

  Base_InitStruct | : Pointer to LPTIM_BaseInitTypeDef structure that contains the configuration information for the specified LPTIM module.

Return values

  None |

## ◆ LPTIM_ClearFlag()

void LPTIM_ClearFlag | ( | void |  | ) |

Clears the LPTIM pending interrupt flag.

Parameters

  None |

Return values

  None |

## ◆ LPTIM_ClearITPendingBit()

void LPTIM_ClearITPendingBit | ( | void |  | ) |

Clears the LPTIM pending interrupt bit.

Parameters

  None |

Return values

  None |

## ◆ LPTIM_Cmd()

void LPTIM_Cmd | ( | FunctionalState | NewState | ) |

Enables or disables the LPTIM peripheral.

Parameters

  NewState | The new state of the LPTIM peripheral. This parameter can be: ENABLE or DISABLE.

Return values

  None |

## ◆ LPTIM_DeInit()

void LPTIM_DeInit | ( | void |  | ) |

Deinitializes the LPTIM peripheral registers to their default reset values.

Parameters

  None |

Return values

  None |

## ◆ LPTIM_GateCmd()

void LPTIM_GateCmd | ( | FunctionalState | NewState | ) |

Enables or disables the LPTIM gate function.

Parameters

  NewState | The new state of LPTIM gate function. This parameter can be: ENABLE or DISABLE.

Return values

  None |

## ◆ LPTIM_GetCounter()

uint32_t LPTIM_GetCounter | ( | void |  | ) |

Gets LPTIM counter.

Parameters

  None |

Return values

  Counter | value

## ◆ LPTIM_GetFlagStatus()

FlagStatus LPTIM_GetFlagStatus | ( | void |  | ) |

Checks whether the LPTIM interrupt flag is set or not.

Parameters

  None |

Return values

  The | new state of LPTIM interrupt flag(SET or RESET).

## ◆ LPTIM_GetITStatus()

ITStatus LPTIM_GetITStatus | ( | void |  | ) |

Checks whether the LPTIM interrupt is set or not.

Parameters

  None |

Return values

  The | new state of LPTIM interrupt (SET or RESET).

## ◆ LPTIM_GetSyncFlag()

FlagStatus LPTIM_GetSyncFlag | ( | void |  | ) |

Waits for LPTIM WT sync finish.

Parameters

  None |

Return values

  The | new state of syns finish (SET or RESET).

## ◆ LPTIM_ITCmd()

void LPTIM_ITCmd | ( | FunctionalState | NewState | ) |

Enables or disables the LPTIM interrupt.

Parameters

  NewState | The new state of LPTIM interrupt. This parameter can be: ENABLE or DISABLE.

Return values

  None |

## ◆ LPTIM_SetCounter()

void LPTIM_SetCounter | ( | uint32_t | Counter | ) |

Sets the LPTIM counter register value on runtime.

Parameters

  Counter | Counter value.

Return values

  None |

## ◆ LPTIM_SetGateLevel()

void LPTIM_SetGateLevel | ( | uint32_t | Level | ) |

Sets gate level high or low.

Parameters

  Level | Gate level configuartion. This param can be LPTIM_GATELEVEL_HIGH or LPTIM_GATELEVEL_LOW.

Return values

  None |

## ◆ LPTIM_TCKCmd()

void LPTIM_TCKCmd | ( | FunctionalState | NewState | ) |

Enables or disables the LPTIM time clock.

Parameters

  NewState | The new state of the LPTIM peripheral. This parameter can be: ENABLE or DISABLE.

Return values

  None |

## ◆ LPTIM_ToggleCmd()

void LPTIM_ToggleCmd | ( | FunctionalState | NewState | ) |

Enables or disables the LPTIM toggle function.

Parameters

  NewState | The new state of LPTIM toggle function. This parameter can be: ENABLE or DISABLE.

Return values

  None |