uint32_t app_timer_stop_all(void) { // Check state VERIFY_MODULE_INITIALIZED(); return timer_stop_op_schedule(NULL, TIMER_USER_OP_TYPE_STOP_ALL); }
uint32_t app_timer_stop(app_timer_id_t timer_id) { // Check state and parameters if (mp_nodes == NULL) { #ifdef DEBUG_LOG printf("app_timer_stop\r\n"); #endif return NRF_ERROR_INVALID_STATE; } if (timer_id >= m_node_array_size) { return NRF_ERROR_INVALID_PARAM; } if (mp_nodes[timer_id].state != STATE_ALLOCATED) { #ifdef DEBUG_LOG printf("app_timer_stop\r\n"); #endif return NRF_ERROR_INVALID_STATE; } // Schedule timer stop operation return timer_stop_op_schedule(user_id_get(), timer_id); }
uint32_t app_timer_stop(app_timer_id_t timer_id) { timer_node_t * p_node = (timer_node_t*)timer_id; // Check state and parameters VERIFY_MODULE_INITIALIZED(); if ((timer_id == NULL) || (p_node->p_timeout_handler == NULL)) { return NRF_ERROR_INVALID_STATE; } p_node->is_running = false; // Schedule timer stop operation return timer_stop_op_schedule(p_node, TIMER_USER_OP_TYPE_STOP); }
uint32_t app_timer_stop(app_timer_id_t timer_id) { timer_node_t * p_node = (timer_node_t*)timer_id; // Check state and parameters if (mp_users == NULL) { return NRF_ERROR_INVALID_STATE; } if ((timer_id == NULL) || (p_node->p_timeout_handler == NULL)) { return NRF_ERROR_INVALID_STATE; } // Schedule timer stop operation return timer_stop_op_schedule(user_id_get(), p_node); }