Exemple #1
0
void ReportDevStatusHandle(void)
{
	uint8_t Device_Status = 0;
	if(ReportTimeCount >= 3000)
	{
		ReportTimeCount = 0;
		Device_Status = memcmp(&Device_ReadStruct,&Pro_D2W_ReportStatusStruct.Device_All.Device_Read, sizeof(Device_ReadStruct));
		if(Device_Status)
		{
			Pro_D2W_ReportDevStatusHandle();
		}	
	}
}
Exemple #2
0
void Infrared_EXTI_IRQHandler (void)
{
	EXTI->EMR &= (uint32_t)~(1<<1);   									//屏蔽中断事件

	while(EXTI_GetITStatus(Infrared_EXTI_LineX)!= RESET ) 
	{		
		printf("Infrared_EXTI...\r\n");
		if(GPIO_ReadInputDataBit(Infrared_GPIO_PORT, Infrared_GPIO_PIN))
		{
			Device_ReadStruct.Infrared = FALSE;
		}
		else
		{		
			Device_ReadStruct.Infrared = TRUE;
		}	
		Pro_D2W_ReportDevStatusHandle();
		EXTI_ClearITPendingBit(Infrared_EXTI_LineX);
	}	
	
	EXTI->EMR |= (uint32_t)(1<<1);  										//开启中断事件  
}
Exemple #3
0
void Pro_W2D_ReadDevStatusHandle(void)
{
    Pro_D2W_ReportDevStatusHandle();
}