MG32L003 Standard Peripherals Firmware Library

函数
LPTIM_Private_Functions
MG32L003_StdPeriph_Driver » LPTIM

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

## 详细描述

## 函数说明

## ◆ LPTIM_BaseInit()

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

Low Power Time base configuration

参数

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

返回值

  None |

## ◆ LPTIM_ClearFlag()

void LPTIM_ClearFlag | ( | void |  | ) |

Clears the LPTIM pending interrupt flag.

参数

  None |

返回值

  None |

## ◆ LPTIM_ClearITPendingBit()

void LPTIM_ClearITPendingBit | ( | void |  | ) |

Clears the LPTIM pending interrupt bit.

参数

  None |

返回值

  None |

## ◆ LPTIM_Cmd()

void LPTIM_Cmd | ( | FunctionalState | NewState | ) |

Enables or disables the LPTIM peripheral.

参数

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

返回值

  None |

## ◆ LPTIM_DeInit()

void LPTIM_DeInit | ( | void |  | ) |

Deinitializes the LPTIM peripheral registers to their default reset values.

参数

  None |

返回值

  None |

## ◆ LPTIM_GateCmd()

void LPTIM_GateCmd | ( | FunctionalState | NewState | ) |

Enables or disables the LPTIM gate function.

参数

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

返回值

  None |

## ◆ LPTIM_GetCounter()

uint32_t LPTIM_GetCounter | ( | void |  | ) |

Gets LPTIM counter.

参数

  None |

返回值

  Counter | value

## ◆ LPTIM_GetFlagStatus()

FlagStatus LPTIM_GetFlagStatus | ( | void |  | ) |

Checks whether the LPTIM interrupt flag is set or not.

参数

  None |

返回值

  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.

参数

  None |

返回值

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

## ◆ LPTIM_GetSyncFlag()

FlagStatus LPTIM_GetSyncFlag | ( | void |  | ) |

Waits for LPTIM WT sync finish.

参数

  None |

返回值

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

## ◆ LPTIM_ITCmd()

void LPTIM_ITCmd | ( | FunctionalState | NewState | ) |

Enables or disables the LPTIM interrupt.

参数

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

返回值

  None |

## ◆ LPTIM_SetCounter()

void LPTIM_SetCounter | ( | uint32_t | Counter | ) |

Sets the LPTIM counter register value on runtime.

参数

  Counter | Counter value.

返回值

  None |

## ◆ LPTIM_SetGateLevel()

void LPTIM_SetGateLevel | ( | uint32_t | Level | ) |

Sets gate level high or low.

参数

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

返回值

  None |

## ◆ LPTIM_TCKCmd()

void LPTIM_TCKCmd | ( | FunctionalState | NewState | ) |

Enables or disables the LPTIM time clock.

参数

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

返回值

  None |

## ◆ LPTIM_ToggleCmd()

void LPTIM_ToggleCmd | ( | FunctionalState | NewState | ) |

Enables or disables the LPTIM toggle function.

参数

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

返回值

  None |