This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

which changes are require in code when use of wakeup button ?

Respected sir, 

There is added external reset button at SRU532 module, and changes are given according to it using wakeup button at code.When wakeup button is used then some part is uncommented and want to reset only one pin using one button of nRF51422.It is done for reset time of BLE advertising after 3 min or within 1 hr,but it is not worked.How it will solve?

...

Parents
  • **@brief Application's Stack ANT event handler.
     *
     * @param[in]   p_ant_evt   Event received from the stack.
     */
    static void on_ant_evt(ant_evt_t * p_ant_evt)
    {
    	uint32_t err_code;
        /*if (p_ant_evt->channel == ANT_HRMRX_ANT_CHANNEL)// oeration of the HRT channel
        {
            switch (p_ant_evt->event)
            {
                case EVENT_RX:
                    on_ant_evt_rx(p_ant_evt);
                    break;
    
                case EVENT_CHANNEL_CLOSED:
                    on_ant_evt_channel_closed();
                    break;
    
                default:
                    // No implementation needed.
                    break;
            }
        }*/
    		
    		if (p_ant_evt->channel == ANT_FALCOTX_ANT_CHANNEL) // operation of the falco-motor channel 
    		{
    			 switch (p_ant_evt->event)
            {
    						case EVENT_TX: // if transmisson 
                     //channel_event_handle(event); // boradcast the Hx_M motor  data  
    									on_ant_evt_tx(p_ant_evt);		
                     break;	
    					
                case EVENT_RX:
                    on_ant_evt_rx(p_ant_evt);
                    break;
    
                case EVENT_CHANNEL_CLOSED:
                    on_ant_evt_channel_closed();
    
    						err_code = sd_ant_channel_open(ANT_FALCOTX_ANT_CHANNEL); // open the Motor CH0 
    								APP_ERROR_CHECK(err_code);
    	            
                  
                    break;
    
                default:
                    // No implementation needed.
                    break;
            }
    			
    			
    		}
       else if (p_ant_evt->channel == ANT_FALCOTTX_ANT_CHANNEL) // operation of the falco-motor channel 
    		{
    			 switch (p_ant_evt->event)
            {
    						case EVENT_TX: // if transmisson 
                     //channel_event_handle(event); // boradcast the Hx_M TS sensor data
    									on_ant_evt_tx(p_ant_evt);	
                     break;
    						
                case EVENT_RX:
                    on_ant_evt_rx(p_ant_evt);
                    break;
    
                case EVENT_CHANNEL_CLOSED:
                    on_ant_evt_channel_closed();
    						
    								err_code = sd_ant_channel_open(ANT_FALCOTTX_ANT_CHANNEL);// open the TS CH1 
    								APP_ERROR_CHECK(err_code);				
    							
                    break;
    
                default:
                    // No implementation needed.
                    break;
            }
    			
    			
    		}		

Reply
  • **@brief Application's Stack ANT event handler.
     *
     * @param[in]   p_ant_evt   Event received from the stack.
     */
    static void on_ant_evt(ant_evt_t * p_ant_evt)
    {
    	uint32_t err_code;
        /*if (p_ant_evt->channel == ANT_HRMRX_ANT_CHANNEL)// oeration of the HRT channel
        {
            switch (p_ant_evt->event)
            {
                case EVENT_RX:
                    on_ant_evt_rx(p_ant_evt);
                    break;
    
                case EVENT_CHANNEL_CLOSED:
                    on_ant_evt_channel_closed();
                    break;
    
                default:
                    // No implementation needed.
                    break;
            }
        }*/
    		
    		if (p_ant_evt->channel == ANT_FALCOTX_ANT_CHANNEL) // operation of the falco-motor channel 
    		{
    			 switch (p_ant_evt->event)
            {
    						case EVENT_TX: // if transmisson 
                     //channel_event_handle(event); // boradcast the Hx_M motor  data  
    									on_ant_evt_tx(p_ant_evt);		
                     break;	
    					
                case EVENT_RX:
                    on_ant_evt_rx(p_ant_evt);
                    break;
    
                case EVENT_CHANNEL_CLOSED:
                    on_ant_evt_channel_closed();
    
    						err_code = sd_ant_channel_open(ANT_FALCOTX_ANT_CHANNEL); // open the Motor CH0 
    								APP_ERROR_CHECK(err_code);
    	            
                  
                    break;
    
                default:
                    // No implementation needed.
                    break;
            }
    			
    			
    		}
       else if (p_ant_evt->channel == ANT_FALCOTTX_ANT_CHANNEL) // operation of the falco-motor channel 
    		{
    			 switch (p_ant_evt->event)
            {
    						case EVENT_TX: // if transmisson 
                     //channel_event_handle(event); // boradcast the Hx_M TS sensor data
    									on_ant_evt_tx(p_ant_evt);	
                     break;
    						
                case EVENT_RX:
                    on_ant_evt_rx(p_ant_evt);
                    break;
    
                case EVENT_CHANNEL_CLOSED:
                    on_ant_evt_channel_closed();
    						
    								err_code = sd_ant_channel_open(ANT_FALCOTTX_ANT_CHANNEL);// open the TS CH1 
    								APP_ERROR_CHECK(err_code);				
    							
                    break;
    
                default:
                    // No implementation needed.
                    break;
            }
    			
    			
    		}		

Children
No Data
Related