46 lines
1.8 KiB
C
46 lines
1.8 KiB
C
|
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
|
#ifndef _STOP_H
|
|
#define _STOP_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
#include "global.h"
|
|
|
|
|
|
#define PWR_STOP_HSI_STANDBY_Pos 10
|
|
#define PWR_STOP_HSI_STANDBY_Msk (1<<PWR_STOP_HSI_STANDBY_Pos)
|
|
#define PWR_STOP_FLASH_STANDBY_Pos 9
|
|
#define PWR_STOP_FLASH_STANDBY_Msk (1UL<<PWR_STOP_FLASH_STANDBY_Pos)
|
|
#define PWR_STOP_LDO_STANDBY_Pos 8
|
|
#define PWR_STOP_LDO_STANDBY_Msk (1UL<<PWR_STOP_LDO_STANDBY_Pos)
|
|
|
|
#define PWR_STOPEntry_WFI ((uint8_t)0x01)
|
|
#define PWR_STOPEntry_WFE ((uint8_t)0x02)
|
|
|
|
/**
|
|
* @brief EXTI State Structure definition
|
|
*/
|
|
typedef struct
|
|
{
|
|
uint32_t GPIO_A; /*!< Bit0-Bit15 indicates GPIOA IO0-IO15, 1:EXTI Linex has generated event 0:not have generated event*/
|
|
uint32_t GPIO_B; /*!< Bit0-Bit15 indicates GPIOB IO0-IO15, 1:EXTI Linex has generated event 0:not have generated event*/
|
|
uint32_t GPIO_C; /*!< Bit0-Bit15 indicates GPIOC IO0-IO15, 1:EXTI Linex has generated event 0:not have generated event*/
|
|
uint32_t GPIO_D; /*!< Bit0-Bit15 indicates GPIOD IO0-IO15, 1:EXTI Linex has generated event 0:not have generated event*/
|
|
uint32_t GPIO_E; /*!< Bit0-Bit15 indicates GPIOE IO0-IO15, 1:EXTI Linex has generated event 0:not have generated event*/
|
|
uint32_t USB_Resume_Rsing; /*!< USB_Resume, 1:EXTI Linex has generated event 0:not have generated event*/
|
|
uint32_t RTC_Alarm; /*!< RTC_Alarm, 1:EXTI Linex has generated event 0:not have generated event*/
|
|
uint32_t IWDT_Alarm; /*!< IWDT_Alarm, 1:EXTI Linex has generated event 0:not have generated event*/
|
|
}EXTI_StateTypeDef;
|
|
|
|
void PWR_EnterSTOPMode(uint8_t StopEntry);
|
|
void APP_EXTI_GPIOC_IRQHandler(EXTI_StateTypeDef *EXTI_State);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
#endif /* __STOP_H */
|
|
|
|
/************************ (C) COPYRIGHT TMC *****END OF FILE****/
|