MG32L003 Standard Peripherals Firmware Library
Data Structures | Macros | Functions
mg32l003_lvd.h File Reference

This file contains all the functions prototypes for the LVD firmware library. More...

#include "mg32l003.h"

Go to the source code of this file.

Data Structures

struct  LVD_InitTypeDef
 LVD Configuration Structure definition. More...
 

Macros

#define LVD_FLTCLK_DISABLE   (0x00000000U)
 
#define LVD_FLTCLK_PCLK   (LVD_CR_FLTCLK_SEL_0)
 
#define LVD_FLTCLK_LSI   (LVD_CR_FLTCLK_SEL_1)
 
#define IS_LVD_FLTCLK(FLTCLK)
 
#define IS_LVD_FLTNUM(FLTNUM)   (((FLTNUM) >= 0U) && ((FLTNUM) <= 0xFFFFU))
 
#define LVD_TRIGGER_HIGHLEVEL   (VCMP_CR1_HIGHINTEN)
 
#define LVD_TRIGGER_RISING   (VCMP_CR1_RISEINTEN)
 
#define LVD_TRIGGER_FALLING   (VCMP_CR1_FALLINTEN)
 
#define LVD_TRIGGER_BOTHEDGE   (VCMP_CR1_RISEINTEN | VCMP_CR1_FALLINTEN)
 
#define LVD_TRIGGER_ALL   (VCMP_CR1_HIGHINTEN | VCMP_CR1_RISEINTEN | VCMP_CR1_FALLINTEN)
 
#define IS_LVD_TRIGGER(LVD_TRIGGER)
 
#define LVD_VOLLEVEL_0   (0x00000000U)
 
#define LVD_VOLLEVEL_1   (LVD_CR_DIV_SEL_0)
 
#define LVD_VOLLEVEL_2   (LVD_CR_DIV_SEL_1)
 
#define LVD_VOLLEVEL_3   (LVD_CR_DIV_SEL_0 | LVD_CR_DIV_SEL_1)
 
#define LVD_VOLLEVEL_4   (LVD_CR_DIV_SEL_2)
 
#define LVD_VOLLEVEL_5   (LVD_CR_DIV_SEL_0 | LVD_CR_DIV_SEL_2)
 
#define LVD_VOLLEVEL_6   (LVD_CR_DIV_SEL_2 | LVD_CR_DIV_SEL_1)
 
#define LVD_VOLLEVEL_7   (LVD_CR_DIV_SEL_2 | LVD_CR_DIV_SEL_1 | LVD_CR_DIV_SEL_0)
 
#define LVD_VOLLEVEL_8   (LVD_CR_DIV_SEL_3)
 
#define LVD_VOLLEVEL_9   (LVD_CR_DIV_SEL_3 | LVD_CR_DIV_SEL_0)
 
#define LVD_VOLLEVEL_A   (LVD_CR_DIV_SEL_3 | LVD_CR_DIV_SEL_1)
 
#define IS_LVD_VOLLEVEL(VOLLEVE)
 
#define LVD_ACTION_INTERRUPT   (0x00000000U)
 
#define LVD_ACTION_RESET   (LVD_CR_ACT)
 
#define IS_LVD_ACTION(ACTION)
 

Functions

void LVD_DIGFLT_Cmd (FunctionalState NewState)
 Enables or disables the LVD digital filter. More...
 
void LVD_Init (LVD_InitTypeDef *InitStruct)
 Initializes the LVD Unit according to the specified parameters in the LVD_InitTypeDef. More...
 
void LVD_Cmd (FunctionalState NewState)
 Enables or disables the LVD peripheral. More...
 
void LVD_DeInit (void)
 Deinitializes the LVD peripheral registers to their default reset values. More...
 
void LVD_ITCmd (FunctionalState NewState)
 Enables or disables LVD interrupt. More...
 
FlagStatus LVD_GetFlagStatus (void)
 Checks whether LVD interrupt flag is set or not. More...
 
ITStatus LVD_GetITStatus (void)
 Checks whether LVD interrupt is set or not. More...
 
void LVD_ClearITPendingBit (void)
 Clears the LVD interrupt bit. More...
 
void LVD_ClearFlag (void)
 Clears the LVD flag. More...
 

Detailed Description

This file contains all the functions prototypes for the LVD firmware library.

Author
megawin Application Team
Version
V0.0.5
Date
13-August-2024