您的位置 首页 新能源

stm32f10x_it.c 的书写

从名字上看,这个文件包含的是和中断相关的函数。确实,中断服务函数应该放到这里来。但是这个里面还包含了一些其它的异常中断的信息。/**…

从姓名上看,这个文件包括的是和中止相关的函数。

的确,中止服务函数应该放到这里来。
可是
这个里边还包括了一些其它的异常中止的信息。
/**
******************************************************************************
* @file USART/Printf/stm32f10x_it.c
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @brief Main Interrupt Service Routines.
* This file provides template for all exceptions handler and peripherals
* interrupt service routine.
******************************************************************************
* @copy
*
* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
* TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
* DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
* FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*
*

COPYRIGHT 2009 STMicroelectronics

*/
#include “stm32f10x_it.h”
#include “stm32f10x_exti.h”
/**
* @brief This function handles NMI exception.
* @param None
* @retval None
*/
void NMI_Handler(void)
{
}
/**
* @brief This function handles Hard Fault exception.
* @param None
* @retval None
*/
void HardFault_Handler(void)
{
/* Go to infinite loop when Hard Fault exception occurs */
while (1)
{
}
}
/**
* @brief This function handles Memory Manage exception.
* @param None
* @retval None
*/
void MemManage_Handler(void)
{
/* Go to infinite loop when Memory Manage exception occurs */
while (1)
{
}
}
/**
* @brief This function handles Bus Fault exception.
* @param None
* @retval None
*/
void BusFault_Handler(void)
{
/* Go to infinite loop when Bus Fault exception occurs */
while (1)
{
}
}
/**
* @brief This function handles Usage Fault exception.
* @param None
* @retval None
*/
void UsageFault_Handler(void)
{
/* Go to infinite loop when Usage Fault exception occurs */
while (1)
{
}
}
/**
* @brief This function handles SVCall exception.
* @param None
* @retval None
*/
void SVC_Handler(void)
{
}
/**
* @brief This function handles Debug Monitor exception.
* @param None
* @retval None
*/
void DebugMon_Handler(void)
{
}
/**
* @brief This function handles PendSV_Handler exception.
* @param None
* @retval None
*/
void PendSV_Handler(void)
{
}
/**
* @brief This function handles SysTick Handler.
* @param None
* @retval None
*/
extern void SysTick_ISR(void);
/*void SysTick_Handler(void)
{
if(net_time05++>=1000)
{ //0.5秒溢出标志
net_time05=0;
net_timeover05=1;
}
if(net_time10++>=20000)
{ //10秒溢出标志
net_time10=0;
net_timeover10=1;
}
}*/
/****************************************************************************
* 名 称:void EXTI1_IRQHandler(void)
* 功 能:ENC28J60 接纳完结 EXTI1中止处理程序
* 进口参数:无
* 出口参数:无
* 说 明:
* 调用办法:无
****************************************************************************/
void EXTI1_IRQHandler(void)
{
/*if(EXTI_GetITStatus(EXTI_Line1) != RESET) //判别是否有键按下
{
ETH_INT=1; //设置接纳完结标志
EXTI_ClearITPendingBit(EXTI_Line1); //铲除中止请求标志
}*/
}
void EXTI9_5_IRQHandler(void)
{
if(EXTI_GetITStatus(EXTI_Line6) != RESET)
{
ETH_INT=1; //设置接纳完结标志
EXTI_ClearITPendingBit(EXTI_Line6); //铲除中止请求标志
}
}
/******************************************************************************/
/* STM32F10x Peripherals Interrupt Handlers */
/* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */
/* available peripheral interrupt handlers name please refer to the startup */
/* file (startup_stm32f10x_xx.s). */
/******************************************************************************/
/**
* @brief This function handles PPP interrupt request.
* @param None
* @retval None
*/
/*void PPP_IRQHandler(void)
{
}*/
/**
* @}
*/
/**
* @}
*/
/******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/

声明:本文内容来自网络转载或用户投稿,文章版权归原作者和原出处所有。文中观点,不代表本站立场。若有侵权请联系本站删除(kf@86ic.com)https://www.86ic.net/qiche/xinnengyuan/268367.html

为您推荐

联系我们

联系我们

在线咨询: QQ交谈

邮箱: kf@86ic.com

关注微信
微信扫一扫关注我们

微信扫一扫关注我们

返回顶部