Lines Matching full:state
24 * Description: Generic BTIF state machine API
43 btif_sm_state_t state;
67 ** Description Initializes the state machine with the state handlers
72 ** Returns Returns a pointer to the initialized state machine handle.
87 p_cb->state = initial_state;
90 /* Send BTIF_SM_ENTER_EVT to the initial state */
100 ** Description Tears down the state machine
121 ** Description Fetches the current state of the state machine
123 ** Returns Current state
136 return p_cb->state;
143 ** Description Dispatches the 'event' along with 'data' to the current state handler
163 if (p_cb->p_handlers[p_cb->state](event, data) == FALSE)
173 ** Description Make a transition to the new 'state'. The 'BTIF_SM_EXIT_EVT'
174 ** shall be invoked before exiting the current state. The
175 ** 'BTIF_SM_ENTER_EVT' shall be invoked before entering the new state
182 bt_status_t btif_sm_change_state(btif_sm_handle_t handle, btif_sm_state_t state)
193 /* Send exit event to the current state */
194 if (p_cb->p_handlers[p_cb->state](BTIF_SM_EXIT_EVT, NULL) == FALSE)
197 /* Change to the new state */
198 p_cb->state = state;
200 /* Send enter event to the new state */
201 if (p_cb->p_handlers[p_cb->state](BTIF_SM_ENTER_EVT, NULL) == FALSE)