Lines Matching defs:state
23 * Description: Generic BTIF state machine API
39 btif_sm_state_t state;
51 ** Description Initializes the state machine with the state handlers
56 ** Returns Returns a pointer to the initialized state machine handle.
68 p_cb->state = initial_state;
71 /* Send BTIF_SM_ENTER_EVT to the initial state */
81 ** Description Tears down the state machine
102 ** Description Fetches the current state of the state machine
104 ** Returns Current state
117 return p_cb->state;
124 ** Description Dispatches the 'event' along with 'data' to the current state handler
144 if (p_cb->p_handlers[p_cb->state](event, data) == FALSE)
154 ** Description Make a transition to the new 'state'. The 'BTIF_SM_EXIT_EVT'
155 ** shall be invoked before exiting the current state. The
156 ** 'BTIF_SM_ENTER_EVT' shall be invoked before entering the new state
163 bt_status_t btif_sm_change_state(btif_sm_handle_t handle, btif_sm_state_t state)
174 /* Send exit event to the current state */
175 if (p_cb->p_handlers[p_cb->state](BTIF_SM_EXIT_EVT, NULL) == FALSE)
178 /* Change to the new state */
179 p_cb->state = state;
181 /* Send enter event to the new state */
182 if (p_cb->p_handlers[p_cb->state](BTIF_SM_ENTER_EVT, NULL) == FALSE)