This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

what's "CHANNEL_IN_WRONG_STATE" ?

hello,

Have any example about how to use "CHANNEL_IN_WRONG_STATE" ?

I don't know how to use it. and also don't know when softdevice return this even.

///< Command response on attempt to perform an action from the wrong channel state

#define CHANNEL_IN_WRONG_STATE ((uint8_t)0x15)


condition: nrf51422/s310

Parents
  • Could I put "CHANNEL_IN_WRONG_STATE" in " on_ant_evt()" ?

    static void on_ant_evt(ant_evt_t * p_ant_evt) {

    if (p_ant_evt->channel == ANT_HRMRX_ANT_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;
    
        case EVENT_RX_FAIL: 
    	break;
    
        case CHANNEL_IN_WRONG_STATE:
    	break;
    
        case EVENT_RX_SEARCH_TIMEOUT:
     		break;
    
        default:
                // No implementation needed.
                break;
        }
    }
    
Reply
  • Could I put "CHANNEL_IN_WRONG_STATE" in " on_ant_evt()" ?

    static void on_ant_evt(ant_evt_t * p_ant_evt) {

    if (p_ant_evt->channel == ANT_HRMRX_ANT_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;
    
        case EVENT_RX_FAIL: 
    	break;
    
        case CHANNEL_IN_WRONG_STATE:
    	break;
    
        case EVENT_RX_SEARCH_TIMEOUT:
     		break;
    
        default:
                // No implementation needed.
                break;
        }
    }
    
Children
Related