Application/User/wt_task_wirefindpoint.c
/**
  * @brief  wire self check task
  * @param  argument: pointer that is passed to the thread function as start argument.
  * @retval None
  */
@brief  wire self check task
@param  argument: pointer that is passed to the thread function as start argument.
@retval None
@brief wire self check task @param argument : pointer that is passed to the thread function as start argument . @retval None
void WIREFINDPOINTThread(void const * argument)
{
	osEvent event;
  uint8_t res;
	uint32_t i;
	FindPoint.task_status = 0;	
	FindPoint.Items_count = 0;
	FindPoint.command = 0;	
	for(i=0;i<sizeof(FindPoint.Items_Point);i++) FindPoint.Items_Point[i] = 0;
  for( ;; )
  {
    event = osMessageGet(WireFindPointEvent, osWaitForever );
    if( event.status == osEventMessage )
    {
      switch(event.value.v)
      {
				case WIREFINDPOINT_START_EVENT:
					FindPoint.task_status = 1;	
					res = WireFindPoint_Process(SelfCheckItem.port_board_number * 64);	
					if(res == 1) 	
					{
						LED4_ON_R(); 
					}
					else					
					{
						LED4_OFF(); 
					}
					FindPoint.task_status = 0;	
					break;
				default:
					break;
      }
    }
  }
}
void WIREFINDPOINTThread ( void const * argument ) { osEvent event ; uint8_t res ; uint32_t i ; FindPoint . task_status = 0 ; FindPoint . Items_count = 0 ; FindPoint . command = 0 ; for ( i = 0 ; i < sizeof ( FindPoint . Items_Point ) ; i ++ ) FindPoint . Items_Point [ i ] = 0 ; for ( ; ; ) { event = osMessageGet ( WireFindPointEvent , osWaitForever ) ; if ( event . status == osEventMessage ) { switch ( event . value . v ) { case WIREFINDPOINT_START_EVENT : FindPoint . task_status = 1 ; res = WireFindPoint_Process ( SelfCheckItem . port_board_number * 64 ) ; if ( res == 1 ) { LED4_ON_R ( ) ; } else { LED4_OFF ( ) ; } FindPoint . task_status = 0 ; break ; default : break ; } } } }
@brief  wire self check task
 @param  argument: pointer that is passed to the thread function as start argument.
@brief wire self check task @param argument : pointer that is passed to the thread function as start argument .
//init the value //0-waiting, 1-finding //0-no operate, 1-start, 2-cancel // start self check //0:waiting, 1:testing //0-ok, 1-error, 2-user cancel //led4_on - red //led4_off //0:waiting, 1:testing