亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? usb.c

?? KEIL驅(qū)動(dòng) 各方面各 你的看法女士的煩惱 方看到你
?? C
?? 第 1 頁 / 共 5 頁
字號(hào):
    {
        HWREGB(ulBase + USB_O_TXCSRL1 + EP_OFFSET(ulEndpoint)) &= ~ulFlags;
        HWREGB(ulBase + USB_O_RXCSRL1 + EP_OFFSET(ulEndpoint)) &=
            ~(ulFlags >> USB_RX_EPSTATUS_SHIFT);
    }
}

//*****************************************************************************
//
//! Clears the status bits in this endpoint in device mode.
//!
//! \param ulBase specifies the USB module base address.
//! \param ulEndpoint is the endpoint to access.
//! \param ulFlags are the status bits that will be cleared.
//!
//! This function will clear the status of any bits that are passed in the
//! \e ulFlags parameter.  The \e ulFlags parameter can take the value returned
//! from the USBEndpointStatus() call.
//!
//! \note This function should only be called in device mode.
//!
//! \return None.
//
//*****************************************************************************
void
USBDevEndpointStatusClear(unsigned long ulBase, unsigned long ulEndpoint,
                          unsigned long ulFlags)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == USB0_BASE);
    ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) ||
           (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3));

    //
    // If this is endpoint 0 then the bits have different meaning and map into
    // the TX memory location.
    //
    if(ulEndpoint == USB_EP_0)
    {
        //
        // Set the Serviced RxPktRdy bit to clear the RxPktRdy.
        //
        if(ulFlags & USB_DEV_EP0_OUT_PKTRDY)
        {
            HWREGB(ulBase + USB_O_CSRL0) |= USB_CSRL0_RXRDYC;
        }

        //
        // Set the serviced Setup End bit to clear the SetupEnd status.
        //
        if(ulFlags & USB_DEV_EP0_SETUP_END)
        {
            HWREGB(ulBase + USB_O_CSRL0) |= USB_CSRL0_SETENDC;
        }

        //
        // Clear the Sent Stall status flag.
        //
        if(ulFlags & USB_DEV_EP0_SENT_STALL)
        {
            HWREGB(ulBase + USB_O_CSRL0) &= ~(USB_DEV_EP0_SENT_STALL);
        }
    }
    else
    {
        //
        // Clear out any TX flags that were passed in.  Only
        // USB_DEV_TX_SENT_STALL and USB_DEV_TX_UNDERRUN should be cleared.
        //
        HWREGB(ulBase + USB_O_TXCSRL1 + EP_OFFSET(ulEndpoint)) &=
            ~(ulFlags & (USB_DEV_TX_SENT_STALL | USB_DEV_TX_UNDERRUN));

        //
        // Clear out valid RX flags that were passed in.  Only
        // USB_DEV_RX_SENT_STALL, USB_DEV_RX_DATA_ERROR, and USB_DEV_RX_OVERRUN
        // should be cleared.
        //
        HWREGB(ulBase + USB_O_RXCSRL1 + EP_OFFSET(ulEndpoint)) &=
            ~((ulFlags & (USB_DEV_RX_SENT_STALL | USB_DEV_RX_DATA_ERROR |
                          USB_DEV_RX_OVERRUN)) >> USB_RX_EPSTATUS_SHIFT);
    }
}

//*****************************************************************************
//
//! Sets the value data toggle on an endpoint in host mode.
//!
//! \param ulBase specifies the USB module base address.
//! \param ulEndpoint specifies the endpoint to reset the data toggle.
//! \param bDataToggle specifies whether to set the state to DATA0 or DATA1.
//! \param ulFlags specifies whether to set the IN or OUT endpoint.
//!
//! This function is used to force the state of the data toggle in host mode.
//! If the value passed in the \e bDataToggle parameter is \b false, then the
//! data toggle will be set to the DATA0 state, and if it is \b true it will be
//! set to the DATA1 state.  The \e ulFlags parameter can be \b USB_EP_HOST_IN
//! or \b USB_EP_HOST_OUT to access the desired portion of this endpoint.  The
//! \e ulFlags parameter is ignored for endpoint zero.
//!
//! \note This function should only be called in host mode.
//!
//! \return None.
//
//*****************************************************************************
void
USBHostEndpointDataToggle(unsigned long ulBase, unsigned long ulEndpoint,
                          tBoolean bDataToggle, unsigned long ulFlags)
{
    unsigned long ulDataToggle;

    //
    // Check the arguments.
    //
    ASSERT(ulBase == USB0_BASE);
    ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) ||
           (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3));

    //
    // The data toggle defaults to DATA0.
    //
    ulDataToggle = 0;

    //
    // See if the data toggle should be set to DATA1.
    //
    if(bDataToggle)
    {
        //
        // Select the data toggle bit based on the endpoint.
        //
        if(ulEndpoint == USB_EP_0)
        {
            ulDataToggle = USB_CSRH0_DT;
        }
        else if(ulFlags == USB_EP_HOST_IN)
        {
            ulDataToggle = USB_RXCSRH1_DT;
        }
        else
        {
            ulDataToggle = USB_TXCSRH1_DT;
        }
    }

    //
    // Set the data toggle based on the endpoint.
    //
    if(ulEndpoint == USB_EP_0)
    {
        //
        // Set the write enable and the bit value for endpoint zero.
        //
        HWREGB(ulBase + USB_O_CSRH0) =
            ((HWREGB(ulBase + USB_O_CSRH0) &
              ~(USB_CSRH0_DTWE | USB_CSRH0_DT)) |
             (ulDataToggle | USB_CSRH0_DTWE));
    }
    else if(ulFlags == USB_EP_HOST_IN)
    {
        //
        // Set the Write enable and the bit value for an IN endpoint.
        //
        HWREGB(ulBase + USB_O_RXCSRH1 + EP_OFFSET(ulEndpoint)) =
            ((HWREGB(ulBase + USB_O_RXCSRH1 + EP_OFFSET(ulEndpoint)) &
              ~(USB_RXCSRH1_DTWE | USB_RXCSRH1_DT)) |
             (ulDataToggle | USB_RXCSRH1_DTWE));
    }
    else
    {
        //
        // Set the Write enable and the bit value for an OUT endpoint.
        //
        HWREGB(ulBase + USB_O_TXCSRH1 + EP_OFFSET(ulEndpoint)) =
            ((HWREGB(ulBase + USB_O_TXCSRH1 + EP_OFFSET(ulEndpoint)) &
              ~(USB_TXCSRH1_DTWE | USB_TXCSRH1_DT)) |
             (ulDataToggle | USB_TXCSRH1_DTWE));
    }
}

//*****************************************************************************
//
//! Sets the Data toggle on an endpoint to zero.
//!
//! \param ulBase specifies the USB module base address.
//! \param ulEndpoint specifies the endpoint to reset the data toggle.
//! \param ulFlags specifies whether to access the IN or OUT endpoint.
//!
//! This function will cause the controller to clear the data toggle for an
//! endpoint.  This call is not valid for endpoint zero and can be made with
//! host or device controllers.
//!
//! The \e ulFlags parameter should be one of \b USB_EP_HOST_OUT,
//! \b USB_EP_HOST_IN, \b USB_EP_DEV_OUT, or \b USB_EP_DEV_IN.
//!
//! \return None.
//
//*****************************************************************************
void
USBEndpointDataToggleClear(unsigned long ulBase, unsigned long ulEndpoint,
                           unsigned long ulFlags)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == USB0_BASE);
    ASSERT((ulEndpoint == USB_EP_1) ||
           (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3));

    //
    // See if the transmit or recieve data toggle should be cleared.
    //
    if(ulFlags & (USB_EP_HOST_OUT | USB_EP_DEV_IN))
    {
        HWREGB(ulBase + USB_O_TXCSRL1 + EP_OFFSET(ulEndpoint)) |=
            USB_TXCSRL1_CLRDT;
    }
    else
    {
        HWREGB(ulBase + USB_O_RXCSRL1 + EP_OFFSET(ulEndpoint)) |=
            USB_RXCSRL1_CLRDT;
    }
}

//*****************************************************************************
//
//! Stalls the specified endpoint in device mode.
//!
//! \param ulBase specifies the USB module base address.
//! \param ulEndpoint specifies the endpoint to stall.
//! \param ulFlags specifies whether to stall the IN or OUT endpoint.
//!
//! This function will cause to endpoint number passed in to go into a stall
//! condition.  If the \e ulFlags parameter is \b USB_EP_DEV_IN then the stall
//! will be issued on the IN portion of this endpoint.  If the \e ulFlags
//! parameter is \b USB_EP_DEV_OUT then the stall will be issued on the OUT
//! portion of this endpoint.
//!
//! \note This function should only be called in device mode.
//!
//! \return None.
//
//*****************************************************************************
void
USBDevEndpointStall(unsigned long ulBase, unsigned long ulEndpoint,
                    unsigned long ulFlags)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == USB0_BASE);
    ASSERT((ulFlags & ~(USB_EP_DEV_IN | USB_EP_DEV_OUT)) == 0)
    ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) ||
           (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3));

    //
    // Determine how to stall this endpoint.
    //
    if(ulEndpoint == USB_EP_0)
    {
        //
        // Perform a stall on endpoint zero.
        //
        HWREGB(ulBase + USB_O_CSRL0) |=
            (USB_CSRL0_STALL | USB_CSRL0_RXRDYC);
    }
    else if(ulFlags == USB_EP_DEV_IN)
    {
        //
        // Perform a stall on an IN endpoint.
        //
        HWREGB(ulBase + USB_O_TXCSRL1 + EP_OFFSET(ulEndpoint)) |=
            USB_TXCSRL1_STALL;
    }
    else
    {
        //
        // Perform a stall on an OUT endpoint.
        //
        HWREGB(ulBase + USB_O_RXCSRL1 + EP_OFFSET(ulEndpoint)) |=
            USB_RXCSRL1_STALL;
    }
}

//*****************************************************************************
//
//! Clears the stall condition on the specified endpoint in device mode.
//!
//! \param ulBase specifies the USB module base address.
//! \param ulEndpoint specifies which endpoint to remove the stall condition.
//! \param ulFlags specifies whether to remove the stall condition from the IN
//! or the OUT portion of this endpoint.
//!
//! This function will cause the endpoint number passed in to exit the stall
//! condition.  If the \e ulFlags parameter is \b USB_EP_DEV_IN then the stall
//! will be cleared on the IN portion of this endpoint.  If the \e ulFlags
//! parameter is \b USB_EP_DEV_OUT then the stall will be cleared on the OUT
//! portion of this endpoint.
//!
//! \note This function should only be called in device mode.
//!
//! \return None.
//
//*****************************************************************************
void
USBDevEndpointStallClear(unsigned long ulBase, unsigned long ulEndpoint,
                         unsigned long ulFlags)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == USB0_BASE);
    ASSERT((ulEndpoint == USB_EP_0) || (ulEndpoint == USB_EP_1) ||
           (ulEndpoint == USB_EP_2) || (ulEndpoint == USB_EP_3));
    ASSERT((ulFlags & ~(USB_EP_DEV_IN | USB_EP_DEV_OUT)) == 0)

    //
    // Determine how to clear the stall on this endpoint.
    //
    if(ulEndpoint == USB_EP_0)
    {
        //
        // Clear the stall on endpoint zero.
        //
        HWREGB(ulBase + USB_O_CSRL0) &= ~USB_CSRL0_STALLED;
    }
    else if(ulFlags == USB_EP_DEV_IN)
    {
        //
        // Clear the stall on an IN endpoint.
        //
        HWREGB(ulBase + USB_O_TXCSRL1 + EP_OFFSET(ulEndpoint)) &=
            ~(USB_TXCSRL1_STALL | USB_TXCSRL1_STALLED);
    }
    else
    {
        //
        // Clear the stall on an OUT endpoint.
        //
        HWREGB(ulBase + USB_O_RXCSRL1 + EP_OFFSET(ulEndpoint)) &=
            ~(USB_RXCSRL1_STALL | USB_RXCSRL1_STALLED);
    }
}

//*****************************************************************************
//
//! Connects the USB controller to the bus in device mode.
//!
//! \param ulBase specifies the USB module base address.
//!
//! This function will cause the soft connect feature of the USB controller to
//! be enabled.  Call USBDisconnect() to remove the USB device from the bus.
//!
//! \note This function should only be called in device mode.
//!
//! \return None.
//
//*****************************************************************************
void
USBDevConnect(unsigned long ulBase)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == USB0_BASE);

    //
    // Enable connection to the USB bus.
    //
    HWREGB(ulBase + USB_O_POWER) |= USB_POWER_SOFTCONN;
}

//*****************************************************************************
//
//! Removes the USB controller from the bus in device mode.
//!
//! \param ulBase specifies the USB module base address.
//!
//! This function will cause the soft connect feature of the USB controller to
//! remove the device from the USB bus.  A call to USBDevConnect() is needed to
//! reconnect to the bus.
//!
//! \note This function should only be called in device mode.
//!
//! \return None.
//
//*****************************************************************************
void
USBDevDisconnect(unsigned long ulBase)
{

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩经典中文字幕一区| www亚洲一区| 成人爱爱电影网址| 狠狠色2019综合网| 日本亚洲最大的色成网站www| 亚洲已满18点击进入久久| 国产精品久久久久一区| 欧美国产激情二区三区| 亚洲欧洲美洲综合色网| 亚洲色图19p| 亚洲第一福利一区| 美女视频一区二区| 国产精品99久| 99精品视频免费在线观看| 色婷婷综合五月| 欧美丰满嫩嫩电影| 久久精品欧美一区二区三区不卡 | 亚洲色图欧美在线| 亚洲欧美另类图片小说| 亚洲小少妇裸体bbw| 免费成人你懂的| 国内精品伊人久久久久av影院 | 亚洲欧洲日韩av| 亚洲国产精品视频| 久久精品国产网站| 波多野结衣精品在线| 欧美性大战久久| 欧美日产国产精品| 国产清纯在线一区二区www| 中文字幕亚洲成人| 免费久久精品视频| av一区二区久久| 5566中文字幕一区二区电影| 日韩精品资源二区在线| 最好看的中文字幕久久| 日韩av一区二区三区四区| 国产成人免费视频一区| 91福利精品第一导航| 亚洲精品在线免费观看视频| 亚洲欧美日韩国产手机在线| 喷白浆一区二区| 色婷婷av久久久久久久| 久久亚洲捆绑美女| 亚洲电影一区二区| 成人免费视频app| 91精品国产91久久久久久一区二区| 国产女主播在线一区二区| 亚洲一级在线观看| 91蜜桃免费观看视频| 久久久亚洲精品一区二区三区| 亚洲综合久久久久| 成人激情视频网站| 精品福利视频一区二区三区| 亚洲综合在线观看视频| 国产成+人+日韩+欧美+亚洲| 欧美一区二区三区白人 | 欧美军同video69gay| 国产精品第13页| 国产乱对白刺激视频不卡| 欧美精品vⅰdeose4hd| 亚洲日本电影在线| jlzzjlzz亚洲女人18| 国产亚洲精品bt天堂精选| 欧美aⅴ一区二区三区视频| 欧美日韩小视频| 亚洲另类春色校园小说| 不卡的电影网站| 国产精品美女久久久久久久久| 国产在线一区二区综合免费视频| 欧美精品日韩精品| 一区二区三区成人| 欧美特级限制片免费在线观看| 亚洲乱码国产乱码精品精98午夜| 成av人片一区二区| 中文字幕中文乱码欧美一区二区| 成人亚洲精品久久久久软件| xfplay精品久久| 国产成人在线视频免费播放| 久久久久国色av免费看影院| 丰满放荡岳乱妇91ww| 中文字幕av一区二区三区高| av高清久久久| 亚洲一区二区三区美女| 欧美老年两性高潮| 免费欧美在线视频| 日本一区二区三区在线不卡| 成人免费av在线| 亚洲另类色综合网站| 91国产精品成人| 欧美96一区二区免费视频| 日韩欧美国产一区在线观看| 精品一区二区在线视频| 国产欧美日韩在线看| 91美女片黄在线观看91美女| 亚洲国产成人av网| 久久综合给合久久狠狠狠97色69| 国产suv精品一区二区6| 亚洲欧洲综合另类| 欧美一区二区三区爱爱| 国产白丝网站精品污在线入口| 亚洲免费成人av| 日韩欧美资源站| 成人开心网精品视频| 偷偷要91色婷婷| 国产亚洲成av人在线观看导航| 一本久久a久久免费精品不卡| 国产精品91一区二区| 亚洲欧洲中文日韩久久av乱码| 91.xcao| 国产夫妻精品视频| 亚洲第一福利一区| 久久精品男人天堂av| 欧美三级视频在线| 国产成人精品一区二区三区四区| 一个色在线综合| 国产午夜亚洲精品羞羞网站| 欧美午夜精品久久久| 国产成人欧美日韩在线电影| 亚洲成在人线在线播放| 欧美极品另类videosde| 717成人午夜免费福利电影| 国产.精品.日韩.另类.中文.在线.播放| 亚洲美女屁股眼交3| 久久综合九色综合97婷婷女人 | 宅男在线国产精品| 色婷婷国产精品久久包臀| 精品一区二区三区免费播放| 亚洲午夜精品网| 中文字幕在线播放不卡一区| 欧美电视剧在线观看完整版| 欧美在线综合视频| 不卡视频一二三四| 国产成人精品aa毛片| 日韩av中文字幕一区二区| 国产精品久久久久7777按摩| 亚洲免费观看高清完整版在线 | 亚洲sss视频在线视频| 日韩精品中文字幕一区| 欧美亚洲一区二区在线观看| 成人一级片在线观看| 裸体歌舞表演一区二区| 日韩福利电影在线观看| 亚洲伊人伊色伊影伊综合网| 亚洲人成人一区二区在线观看 | 亚洲日本免费电影| 国产精品高潮呻吟| 国产精品久久久久久久久晋中| 久久久久久久免费视频了| 日韩一区二区电影网| 日韩一区二区三区精品视频 | 国产亚洲一本大道中文在线| 日韩午夜精品电影| 欧美一区二区三区公司| 日韩欧美激情四射| 精品国产一区二区国模嫣然| 日韩欧美国产一区二区三区 | 成人av资源在线观看| 99国产精品一区| 色综合天天天天做夜夜夜夜做| 91在线视频免费观看| 91福利在线免费观看| 欧美军同video69gay| 日韩欧美国产三级| 久久精品一级爱片| 中文字幕亚洲一区二区va在线| 《视频一区视频二区| 一区二区三区中文字幕电影| 亚洲一区二区精品久久av| 免费精品99久久国产综合精品| 美女视频黄免费的久久| 国产在线观看免费一区| 成人免费毛片app| 欧美三级日韩三级| 精品久久久久久久一区二区蜜臀| 国产欧美va欧美不卡在线| 亚洲激情自拍视频| 蜜臀91精品一区二区三区| 国产成人三级在线观看| 91麻豆精东视频| 7777精品伊人久久久大香线蕉超级流畅 | 中文字幕乱码日本亚洲一区二区| 国产三级欧美三级| 亚洲一区二区视频| 精品一区二区三区在线观看国产| 国产成人av资源| 欧美日韩一区高清| 国产亚洲视频系列| 香蕉久久一区二区不卡无毒影院 | 成人欧美一区二区三区视频网页| 亚洲小说春色综合另类电影| 黑人精品欧美一区二区蜜桃| 91免费看`日韩一区二区| 欧美一级xxx| 中文字幕中文字幕一区| 91香蕉视频污| 日韩你懂的在线播放| 一级日本不卡的影视| 国产精品一线二线三线| 欧美日韩你懂得| 亚洲欧美在线aaa|