You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: usb.rs
    path of file: ./repos/tock/chips/rp2040/src
    
    the code of the file until where you have to start completion: // Licensed under the Apache License, Version 2.0 or the MIT License.
// SPDX-License-Identifier: Apache-2.0 OR MIT
// Copyright Tock Contributors 2022.

//! Universal Serial Bus Device for Raspberry Pi Pico

//! Authors: Cosmin Radu <cosmin.radu@wyliodrin.com>
//!          Teodora Miu <teodora.miu01@gmail.com>

use crate::gpio::RPGpioPin;
use core::cell::Cell;
use kernel::hil;
use kernel::hil::usb::TransferType;
use kernel::utilities::cells::{
    
    fn endpoint_resume_in(&self, endpoint: usize) {
        // Get the state of the endpoint that the upper layer requested to start
        // an IN transfer with for our state machine.
        let (_, in_state, _) = self.descriptors[endpoint].state.get().bulk_state();
        // If the state is `None`, this endpoint is not configured and should
        // not have been used to call `endpoint_resume_in()`.
        assert!(in_state.is_some());

        // If there is an active request, or we are waiting on finishing up
        // a previous IN transfer, we queue this request and it will be serviced
        // after those complete.
        if in_state == Some(BulkInState::Init) {
            // If we aren't waiting on anything, trigger the transaction now.
            self.transmit_in(endpoint);
        } else {
            self.descriptors[endpoint].request_transmit_in.set(true);
        }
    }