[ create a new paste ] login | about

Link: http://codepad.org/VFSeg6G2    [ raw code | fork ]

C, pasted on Jan 16:
   while(1)
   { 
	   if(myInterruptFlag)
		   {

		   myInterruptFlag=0;
		   }

      if(send_count == 4000000)
	  {
	   val = get_sock_status(SockHandle0);
       if ((val == 1) && (NETWORKTYPE != IBSS))
       {
	       
		   uint16_t index;
		  rsi_wlan_conn_query_req();
       	  if((rssi_value = rsi_send_rssi_query_req()) != RSI_STATUS_FAILURE)
	   	  {

#if 1  // Modified
#define MY_STR "Hello"
		     while ((rsi_send_data(SockHandle0, strlen(MY_STR), MY_STR)) != RSI_STATUS_SUCCESS)
             {
	           /* Do some thing here */
			   ;
	         } 	

#else
       		  /* send the push button status to the client */
			 index = rsi_prepare_pkt_to_send(RSSI, rssi_value, data);

		     while ((rsi_send_data(SockHandle0, index, data)) != RSI_STATUS_SUCCESS)
             {
	           /* Do some thing here */
			   ;

	         }
#endif
			if( ps_mode == 1)
			{
			  rsi_send_sleep_request();	 
			}
	   	  }
		
	   }
		send_count = 0;
	  }
	  send_count++;
	 
	   /* Process the pending interrupts */   
	   if(Adaptor.pkt_received > 0)
	   { 
  		 rsi_interrupt_handler(Adaptor.RcvPkt, &size);
	   }	  
   }


Create a new paste based on this one


Comments: