⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stm32f10x_it.c

📁 STM32F10xx的LCD驱动源码
💻 C
📖 第 1 页 / 共 2 页
字号:
void USB_HP_CAN_TX_IRQHandler(void)
{
}

/*******************************************************************************
* Function Name  : USB_LP_CAN_RX0_IRQHandler
* Description    : This function handles USB Low Priority or CAN RX0 interrupts 
*                  requests.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void USB_LP_CAN_RX0_IRQHandler(void)
{
}

/*******************************************************************************
* Function Name  : CAN_RX1_IRQHandler
* Description    : This function handles CAN RX1 interrupt request.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void CAN_RX1_IRQHandler(void)
{
}

/*******************************************************************************
* Function Name  : CAN_SCE_IRQHandler
* Description    : This function handles CAN SCE interrupt request.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void CAN_SCE_IRQHandler(void)
{
}

/*******************************************************************************
* Function Name  : EXTI9_5_IRQHandler
* Description    : This function handles External lines 9 to 5 interrupt request.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void EXTI9_5_IRQHandler(void)
{
}

/*******************************************************************************
* Function Name  : TIM1_BRK_IRQHandler
* Description    : This function handles TIM1 Break interrupt request.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void TIM1_BRK_IRQHandler(void)
{
}

/*******************************************************************************
* Function Name  : TIM1_UP_IRQHandler
* Description    : This function handles TIM1 overflow and update interrupt 
*                  request.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void TIM1_UP_IRQHandler(void)
{
}

/*******************************************************************************
* Function Name  : TIM1_TRG_COM_IRQHandler
* Description    : This function handles TIM1 Trigger and Commutation interrupts 
*                  requests.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void TIM1_TRG_COM_IRQHandler(void)
{
}

/*******************************************************************************
* Function Name  : TIM1_CC_IRQHandler
* Description    : This function handles TIM1 capture compare interrupt request.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void TIM1_CC_IRQHandler(void)
{
}

/*******************************************************************************
* Function Name  : TIM2_IRQHandler
* Description    : This function handles TIM2 global interrupt request.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void TIM2_IRQHandler(void)
{

       Interrupt_Ststus=TIM2->SR ;
       TIM2->SR         =0x0000;
    if((Interrupt_Ststus&0x0043)==0x0043)
    {    
       /* Get the Input Capture value */
       Cycle      =TIM2->CCR2;
       Duty_Cycle =TIM2->CCR1 ;
      /* Duty cycle computation */
      //Duty_Cycle = (Capture_Value * 100) /Counter_Value;

      /* Frequency computation */
      //Frequency = 1000000 / Counter_Value;
     /* Clear TIM2 Capture compare interrupt pending bit */
     // TIM_ClearITPendingBit(TIM2, TIM_IT_CC2); 
     
  
     if(Cycle  != 0)
      {

         if(Data_Recive_Finish==0)
          {
           if(READY_Flag!=1)                                                               //if not prepaired to recive data
              {
                if((Cycle>=700)&&(Cycle<=900))
                {
                   if((Duty_Cycle>=300)&&(Duty_Cycle<=500))
                    {
                     Pre_Counter++;
                     if (Pre_Counter>=8) 
                       Pre_ready=1;
                    }
                 
                 } else if(Pre_ready)
                         {
                           if((Duty_Cycle<=500)&&(Duty_Cycle>=250))
                           {
                            if((Cycle>=4000)&&(Cycle<=4800))
                             READY_Flag=1;
                           }
                         }else Pre_Counter=0;                                                //?°μ????óêü3?′í£??òêy?Yí·′í?ó?£
             }else                                                                         //recive validate data
                 
               if(((Cycle>=1100)&&(Cycle<=1300)))                                 //it is a  data with the right frequency
                     {
                       Bit_Counter++;
                       if(Bit_Counter<=32) Word_Counter=1;
                         else if(Bit_Counter<=60) Word_Counter=2;
                             else Word_Counter=3;
                       if((Duty_Cycle<=550)&&(Duty_Cycle>=250))                               //the recived data bit is 1
                          {
                            if(Word_Counter==1)                                             //in the process of reciving encrypted code
                             {
                              Recived_Data.Hopping_Code>>=1;
                              Recived_Data.Hopping_Code|=0x80000000;
                             } else if(Word_Counter==2)                                    //in the process of reciving serial number
                                  {
                                   Recived_Data.Serial_Number>>=1;
                                   Recived_Data.Serial_Number|=0x08000000;
                                  } else if(Word_Counter==3)                               //in the process of reciving status ccode 
                                         {
                                           Recived_Data.ButtonAStatus>>=1;
                                           Recived_Data.ButtonAStatus|=0x20;
                                         }
            
                          }else if((Duty_Cycle<=950)&&(Duty_Cycle>=600))                         //the recived data is 0
                               {
                                 
                                if(Word_Counter==1)                                            //now is in the process of reciving enccrypt part of the data
                                   {
                                     Recived_Data.Hopping_Code>>=1;
                                   } else if(Word_Counter==2)                                  
                                        {
                                         Recived_Data.Serial_Number>>=1;
                                        }else if(Word_Counter==3)  
                                           {
                                            Recived_Data.ButtonAStatus>>=1;
                                           }
                              }else                                                          //right frequency but wrong dutycycle, not a validate data ,recive fault,
                                  {
                                   Bit_Counter        =0;
                                   Pre_Counter        =0;
                                   Word_Counter       =0;
                                   READY_Flag         =0;
                                   Data_Recive_Finish =0;
                                  }
                        if(Bit_Counter==65)
                        	{
                        		Delay_XMs(1);
                        		if((TIM2->CCR1 >=600)&&(TIM2->CCR1 <=950))
                        			{
                        			 Bit_Counter++;
                                                 Recived_Data.ButtonAStatus>>=1;
                        		  }else if((TIM2->CCR1 >=250)&&(TIM2->CCR1 <=500))
                        		  	{
                        		  	  Bit_Counter++;
                                                  Recived_Data.ButtonAStatus>>=1;
                                                  Recived_Data.ButtonAStatus|=0x20;
                        		  	}else 
                        		  		{
                        		  		 Bit_Counter=0;
                                                         Pre_Counter        =0;
                                                         Word_Counter       =0;
                                                         READY_Flag         =0;
                        		  		}
                        	}
                        if(Bit_Counter==66)                                                 //wrong frequency ,Data reciving finished
                          {
                            Data_Recive_Finish=1;
                            Bit_Counter  =0;
                            Pre_Counter  =0;
                            Word_Counter =0;
                            READY_Flag   =0;
                          }
                    }else {                                                                //not a validate data ,recive fault,
                            Bit_Counter        =0;
                            Pre_Counter        =0;
                            Word_Counter       =0;
                            READY_Flag         =0;
                            Data_Recive_Finish =0;
                           }
                                                                                                          
          }
      }
    }else{
          Bit_Counter =0;
          Pre_Counter =0;
          Word_Counter=0;
          READY_Flag  =0;
         }
} 

/*******************************************************************************
* Function Name  : TIM3_IRQHandler
* Description    : This function handles TIM3 global interrupt request.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void TIM3_IRQHandler(void)
{
}

/*******************************************************************************
* Function Name  : TIM4_IRQHandler
* Description    : This function handles TIM4 global interrupt request.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void TIM4_IRQHandler(void)
{
}

/*******************************************************************************
* Function Name  : I2C1_EV_IRQHandler
* Description    : This function handles I2C1 Event interrupt request.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void I2C1_EV_IRQHandler(void)
{
}

/*******************************************************************************
* Function Name  : I2C1_ER_IRQHandler
* Description    : This function handles I2C1 Error interrupt request.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void I2C1_ER_IRQHandler(void)
{
}

/*******************************************************************************
* Function Name  : I2C2_EV_IRQHandler
* Description    : This function handles I2C2 Event interrupt request.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void I2C2_EV_IRQHandler(void)
{
}

/*******************************************************************************
* Function Name  : I2C2_ER_IRQHandler
* Description    : This function handles I2C2 Error interrupt request.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void I2C2_ER_IRQHandler(void)
{
}

/*******************************************************************************
* Function Name  : SPI1_IRQHandler
* Description    : This function handles SPI1 global interrupt request.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void SPI1_IRQHandler(void)
{
}

/*******************************************************************************
* Function Name  : SPI2_IRQHandler
* Description    : This function handles SPI2 global interrupt request.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void SPI2_IRQHandler(void)
{
}

/*******************************************************************************
* Function Name  : USART1_IRQHandler
* Description    : This function handles USART1 global interrupt request.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void USART1_IRQHandler(void)
{
}

/*******************************************************************************
* Function Name  : USART2_IRQHandler
* Description    : This function handles USART2 global interrupt request.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void USART2_IRQHandler(void)
{
}

/*******************************************************************************
* Function Name  : USART3_IRQHandler
* Description    : This function handles USART3 global interrupt request.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void USART3_IRQHandler(void)
{
}

/*******************************************************************************
* Function Name  : EXTI15_10_IRQHandler
* Description    : This function handles External lines 15 to 10 interrupt request.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void EXTI15_10_IRQHandler(void)
{
}

/*******************************************************************************
* Function Name  : RTCAlarm_IRQHandler
* Description    : This function handles RTC Alarm interrupt request.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void RTCAlarm_IRQHandler(void)
{
}

/*******************************************************************************
* Function Name  : USBWakeUp_IRQHandler
* Description    : This function handles USB WakeUp interrupt request.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void USBWakeUp_IRQHandler(void)
{
}
/******************* (C) COPYRIGHT 2007 STMicroelectronics *****END OF FILE****/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -