stm32f10x_it.c 的書寫
確實,中斷服務(wù)函數(shù)應(yīng)該放到這里來。
但是
這個里面還包含了一些其它的異常中斷的信息。
/**
******************************************************************************
* @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中斷處理程序
* 入口參數(shù):無
* 出口參數(shù):無
* 說 明:
* 調(diào)用方法:無
****************************************************************************/
void EXTI1_IRQHandler(void)
{
/*if(EXTI_GetITStatus(EXTI_Line1) != RESET) //判別是否有鍵按下
{
ETH_INT=1; //設(shè)置接收完成標志
EXTI_ClearITPendingBit(EXTI_Line1); //清除中斷請求標志
}*/
}
void EXTI9_5_IRQHandler(void)
{
if(EXTI_GetITStatus(EXTI_Line6) != RESET)
{
ETH_INT=1; //設(shè)置接收完成標志
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****/
評論