TM STM32F4xx Libraries  v1.0.0
Libraries for STM32F4xx devices from Tilen Majerle
tm_stm32f4_pvd.h
1 
30 #ifndef TM_PVD_H
31 #define TM_PVD_H 100
32 
33 /* C++ detection */
34 #ifdef __cplusplus
35 extern C {
36 #endif
37 
67 #include "stm32f4xx.h"
68 #include "defines.h"
69 
76 /* NVIC preemption priority */
77 #ifndef PVD_NVIC_PRIORITY
78 #define PVD_NVIC_PRIORITY 0x04
79 #endif
80 
81 /* NVIC subpriority */
82 #ifndef PVD_NVIC_SUBPRIORITY
83 #define PVD_NVIC_SUBPRIORITY 0x00
84 #endif
85 
99 typedef enum {
104 
109 typedef enum {
110  TM_PVD_Level_0 = 0x00,
111  TM_PVD_Level_1 = 0x01,
112  TM_PVD_Level_2 = 0x02,
113  TM_PVD_Level_3 = 0x03,
114  TM_PVD_Level_4 = 0x04,
115  TM_PVD_Level_5 = 0x05,
116  TM_PVD_Level_6 = 0x06,
119 
136 void TM_PVD_Enable(TM_PVD_Level_t Level, TM_PVD_Trigger_t Trigger);
137 
143 void TM_PVD_Disable(void);
144 
153 void TM_PVD_Handler(uint8_t status);
154 
167 /* C++ detection */
168 #ifdef __cplusplus
169 }
170 #endif
171 
172 #endif
Definition: tm_stm32f4_pvd.h:117
Definition: tm_stm32f4_pvd.h:115
void TM_PVD_Enable(TM_PVD_Level_t Level, TM_PVD_Trigger_t Trigger)
Enables PVD feature for interrupt generation when voltage changes are detected.
Definition: tm_stm32f4_pvd.h:101
Definition: tm_stm32f4_pvd.h:112
Definition: tm_stm32f4_pvd.h:114
TM_PVD_Trigger_t
PVD Triggers for interrupt.
Definition: tm_stm32f4_pvd.h:99
void TM_PVD_Handler(uint8_t status)
Callback for handling PVD interrupts.
TM_PVD_Level_t
PVD levels for interrupt triggering.
Definition: tm_stm32f4_pvd.h:109
void TM_PVD_Disable(void)
Disables PVD feature.
Definition: tm_stm32f4_pvd.h:100
Definition: tm_stm32f4_pvd.h:116
Definition: tm_stm32f4_pvd.h:110
Definition: tm_stm32f4_pvd.h:102
Definition: tm_stm32f4_pvd.h:111
Definition: tm_stm32f4_pvd.h:113