/*** * @Author: shenghao.xu * @Date: 2023-04-11 18:46:58 * @LastEditors: shenghao.xu * @LastEditTime: 2023-04-11 22:16:47 * @Description: * @email:545403892@qq.com * @Copyright (c) 2023 by shenghao.xu, All Rights Reserved. */ #ifndef _SYS_H #define _SYS_H #include "stm32l0xx.h" #include "stm32l0xx_hal.h" #include "data_type_def.h" /** * SYS_SUPPORT_OS用于定义系统文件夹是否支持OS * 0,不支持OS * 1,支持OS */ #define SYS_SUPPORT_OS 0 /*函数声明*******************************************************************************************/ void sys_nvic_set_vector_table(uint32_t baseaddr, uint32_t offset); /* 设置中断偏移量 */ void sys_standby(void); /* 进入待机模式 */ void sys_soft_reset(void); /* 系统软复位 */ /* 以下为汇编函数 */ void sys_wfi_set(void); /* 执行WFI指令 */ void sys_intx_disable(void); /* 关闭所有中断 */ void sys_intx_enable(void); /* 开启所有中断 */ void sys_msr_msp(uint32_t addr); /* 设置栈顶地址 */ #endif