MG32F10x Standard Peripherals Firmware Library
Macros | Functions
mg32f10x_pwr.c File Reference

This file provides all the PWR firmware functions. More...

#include "mg32f10x_pwr.h"

Macros

#define CR0_DBP_BB   BIT_BAND_ADDR(&PWR->CR0, 0)
 
#define CR2_EWUP_BB   BIT_BAND_ADDR(&PWR->CR2, 0)
 
#define PRE_LP()   ((void(*)(void))((unsigned int)(pre_lp_code) | 0x01))()
 
#define POST_LP()   ((void(*)(void))((unsigned int)(post_lp_code) | 0x01))()
 

Functions

void PWR_BackupAccessCmd (FunctionalState NewState)
 Enables or disables access to the RTC and backup registers. More...
 
void PWR_WakeUpPinCmd (FunctionalState NewState)
 Enables or disables the WakeUp Pin functionality. More...
 
void PWR_EnterSLEEPMode (uint8_t PWR_FCLK, uint8_t PWR_EntryMode)
 Enters SLEEP mode. More...
 
void PWR_EnterSTOPMode (uint16_t PWR_STOPMode, uint8_t PWR_EntryMode)
 Enters STOP mode. More...
 
void PWR_EnterSTANDBYMode (void)
 Enters STANDBY mode. More...
 
FlagStatus PWR_GetFlagStatus (uint32_t PWR_FLAG)
 Checks whether the specified PWR flag is set or not. More...
 
void PWR_ClearFlag (uint32_t PWR_FLAG)
 Clears the PWR's pending flags. More...
 
void PWR_UnlockANA (void)
 Disable ANCTL register write-protection function. More...
 
void PWR_LockANA (void)
 Enable ANCTL register write-protection function. More...
 

Detailed Description

This file provides all the PWR firmware functions.

Author
megawin Application Team
Version
V0.1.10
Date
05-January-2023