bs_bcu_app/drv/drv_stm32f4xx/drv_misc.h

40 lines
1.2 KiB
C

#ifndef _DRV_MISC_H_
#define _DRV_MISC_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "kit_macro.h"
#define NVIC_PriorityGroup_0 ((uint32_t)0x700) /*!< 0 bits for pre-emption priority, 4 bits for subpriority */
#define NVIC_PriorityGroup_1 ((uint32_t)0x600) /*!< 1 bits for pre-emption priority, 3 bits for subpriority */
#define NVIC_PriorityGroup_2 ((uint32_t)0x500) /*!< 2 bits for pre-emption priority, 2 bits for subpriority */
#define NVIC_PriorityGroup_3 ((uint32_t)0x400) /*!< 3 bits for pre-emption priority, 1 bits for subpriority */
#define NVIC_PriorityGroup_4 ((uint32_t)0x300) /*!< 4 bits for pre-emption priority, 0 bits for subpriority */
typedef enum
{
kPwrOffVolt_2_2,
kPwrOffVolt_2_3,
kPwrOffVolt_2_4,
kPwrOffVolt_2_5,
kPwrOffVolt_2_6,
kPwrOffVolt_2_7,
kPwrOffVolt_2_8,
kPwrOffVolt_2_9,
kPwrOffVolt_End,
}PwrOffVolt;
void drv_misc_reset_mcu(void);
void drv_misc_reset_core(void);
void drv_misc_set_nvic(int8_t irq_channel, uint8_t priority);
void drv_misc_cfg_pwr_off_interrupt(uint8_t priority,PwrOffVolt volt, NoArgCall int_call);
void drv_mist_set_priority_group(uint16_t pri_group);
#ifdef __cplusplus
}
#endif
#endif