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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? pwm.c

?? 基于 Luminary Micro 公司的 Cortex-M3 (ARM)內核使用之 uC/OS-II 作業(yè)系統(tǒng),此例程是移植于 LM3S310 上的應用,于 Keil MDK 工程編譯,而 uC/O
?? C
?? 第 1 頁 / 共 3 頁
字號:
void
PWMGenIntUnregister(unsigned long ulBase, unsigned long ulGen)
{
    unsigned long ulInt;

    //
    // Check the arguments.
    //
    ASSERT(ulBase == PWM_BASE);
    ASSERT((ulGen == PWM_GEN_0) || (ulGen == PWM_GEN_1) ||
           (ulGen == PWM_GEN_2));

    //
    // Get the interrupt number associated with the specified generator.
    //
    ulInt = INT_PWM0 + (ulGen >> 6) - 1;

    //
    // Disable the PWMx interrupt.
    //
    IntDisable(ulInt);

    //
    // Unregister the interrupt.handler.
    //
    IntUnregister(ulInt);
}

//*****************************************************************************
//
//! Registers an interrupt.handler for a fault condition detected in a PWM
//! module.
//!
//! \param ulBase is the base address of the PWM module.
//! \param pfIntHandler is a pointer to the function to be called when the PWM
//! fault interrupt occurs.
//!
//! This function will ensure that the interrupt.handler specified by
//! \e pfIntHandler is called when a fault interrupt is detected for the
//! selected PWM module.  This function will also enable the PWM fault
//! interrupt in the NVIC; the PWM fault interrupt must also be enabled at the
//! module level using PWMIntEnable().
//!
//! \sa IntRegister() for important information about registering interrupt
//! handlers.
//!
//! \return None.
//
//*****************************************************************************
void
PWMFaultIntRegister(unsigned long ulBase, void (*pfIntHandler)(void))
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == PWM_BASE);

    //
    // Register the interrupt.handler, returning an error if one occurs.
    //
    IntRegister(INT_PWM_FAULT, pfIntHandler);

    //
    // Enable the PWM fault interrupt.
    //
    IntEnable(INT_PWM_FAULT);
}

//*****************************************************************************
//
//! Removes the PWM fault condition interrupt.handler.
//!
//! \param ulBase is the base address of the PWM module.
//!
//! This function will remove the interrupt.handler for a PWM fault interrupt
//! from the selected PWM module.  This function will also disable the PWM
//! fault interrupt in the NVIC; the PWM fault interrupt must also be disabled
//! at the module level using PWMIntDisable().
//!
//! \sa IntRegister() for important information about registering interrupt
//! handlers.
//!
//! \return None.
//
//*****************************************************************************
void
PWMFaultIntUnregister(unsigned long ulBase)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == PWM_BASE);

    //
    // Disable the PWM fault interrupt.
    //
    IntDisable(INT_PWM_FAULT);

    //
    // Unregister the interrupt.handler, returning an error if one occurs.
    //
    IntUnregister(INT_PWM_FAULT);
}

//*****************************************************************************
//
//! Enables interrupts and triggers for the specified PWM generator block.
//!
//! \param ulBase is the base address of the PWM module.
//! \param ulGen is the PWM generator to have interrupts and triggers enabled.
//! Must be one of \b PWM_GEN_0, \b PWM_GEN_1, or \b PWM_GEN_2.
//! \param ulIntTrig specifies the interrupts and triggers to be enabled.
//!
//! Unmasks the specified interrupt(s) and trigger(s) by setting the
//! specified bits of the interrupt/trigger enable register for the specified
//! PWM generator.  The defined values for the bits are as follows:
//!
//! - PWM_INT_CNT_ZERO
//! - PWM_INT_CNT_LOAD
//! - PWM_INT_CMP_AU
//! - PWM_INT_CMP_AD
//! - PWM_INT_CMP_BU
//! - PWM_INT_CMP_BD
//! - PWM_TR_CNT_ZERO
//! - PWM_TR_CNT_LOAD
//! - PWM_TR_CMP_AU
//! - PWM_TR_CMP_AD
//! - PWM_TR_CMP_BU
//! - PWM_TR_CMP_BD
//!
//! \return None.
//
//*****************************************************************************
void
PWMGenIntTrigEnable(unsigned long ulBase, unsigned long ulGen,
                    unsigned long ulIntTrig)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == PWM_BASE);
    ASSERT((ulGen == PWM_GEN_0) || (ulGen == PWM_GEN_1) ||
           (ulGen == PWM_GEN_2));

    //
    // Enable the specified interrupts/triggers.
    //
    HWREG(PWM_GEN_BADDR(ulBase, ulGen) + PWM_O_X_INTEN) |= ulIntTrig;
}

//*****************************************************************************
//
//! Disables interrupts for the specified PWM generator block.
//!
//! \param ulBase is the base address of the PWM module.
//! \param ulGen is the PWM generator to have interrupts and triggers disabled.
//! Must be one of \b PWM_GEN_0, \b PWM_GEN_1, or \b PWM_GEN_2.
//! \param ulIntTrig specifies the interrupts and triggers to be disabled.
//!
//! Masks the specified interrupt(s) and trigger(s) by clearing the
//! specified bits of the interrupt/trigger enable register for the specified
//! PWM generator.  The defined values for the bits are as follows:
//!
//! - PWM_INT_CNT_ZERO
//! - PWM_INT_CNT_LOAD
//! - PWM_INT_CMP_AU
//! - PWM_INT_CMP_AD
//! - PWM_INT_CMP_BU
//! - PWM_INT_CMP_BD
//! - PWM_TR_CNT_ZERO
//! - PWM_TR_CNT_LOAD
//! - PWM_TR_CMP_AU
//! - PWM_TR_CMP_AD
//! - PWM_TR_CMP_BU
//! - PWM_TR_CMP_BD
//!
//! \return None.
//
//*****************************************************************************
void
PWMGenIntTrigDisable(unsigned long ulBase, unsigned long ulGen,
                     unsigned long ulIntTrig)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == PWM_BASE);
    ASSERT((ulGen == PWM_GEN_0) || (ulGen == PWM_GEN_1) ||
           (ulGen == PWM_GEN_2));

    //
    // Disable the specified interrupts/triggers.
    //
    HWREG(PWM_GEN_BADDR(ulBase, ulGen) + PWM_O_X_INTEN) &= ~(ulIntTrig);
}

//*****************************************************************************
//
//! Gets interrupt status for the specified PWM generator block.
//!
//! \param ulBase is the base address of the PWM module.
//! \param ulGen is the PWM generator to query.  Must be one of \b PWM_GEN_0,
//! \b PWM_GEN_1, or \b PWM_GEN_2.
//! \param bMasked specifies whether masked or raw interrupt status is
//! returned.
//!
//! If \e bMasked is set as \b true, then the masked interrupt status is
//! returned; otherwise, the raw interrupt status will be returned.
//!
//! \return Returns the contents of the interrupt status register, or the
//! contents of the raw interrupt status register, for the specified
//! PWM generator.
//
//*****************************************************************************
unsigned long
PWMGenIntStatus(unsigned long ulBase, unsigned long ulGen, tBoolean bMasked)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == PWM_BASE);
    ASSERT((ulGen == PWM_GEN_0) || (ulGen == PWM_GEN_1) ||
           (ulGen == PWM_GEN_2));

    //
    // Compute the generator's base address.
    //
    ulGen = PWM_GEN_BADDR(ulBase, ulGen);

    //
    // Read and return the specified generator's raw or enabled interrupt
    // status.
    //
    if(bMasked == true)
    {
        return(HWREG(ulGen + PWM_O_X_ISC));
    }
    else
    {
        return(HWREG(ulGen + PWM_O_X_RIS));
    }
}

//*****************************************************************************
//
//! Clears the specified interrupt(s) for the specified PWM generator block.
//!
//! \param ulBase is the base address of the PWM module.
//! \param ulGen is the PWM generator to query.  Must be one of \b PWM_GEN_0,
//! \b PWM_GEN_1, or \b PWM_GEN_2.
//! \param ulInts specifies the interrupts to be cleared.
//!
//! Clears the specified interrupt(s) by writing a 1 to the specified bits
//! of the interrupt status register for the specified PWM generator.  The
//! defined values for the bits are as follows:
//!
//! - PWM_INT_CNT_ZERO
//! - PWM_INT_CNT_LOAD
//! - PWM_INT_CMP_AU
//! - PWM_INT_CMP_AD
//! - PWM_INT_CMP_BU
//! - PWM_INT_CMP_BD
//!
//! \return None.
//
//*****************************************************************************
void
PWMGenIntClear(unsigned long ulBase, unsigned long ulGen, unsigned long ulInts)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == PWM_BASE);
    ASSERT((ulGen == PWM_GEN_0) || (ulGen == PWM_GEN_1) ||
           (ulGen == PWM_GEN_2));

    //
    // Clear the requested interrupts by writing ones to the specified bit
    // of the module's interrupt enable register.
    //
    HWREG(PWM_GEN_BADDR(ulBase, ulGen) + PWM_O_X_ISC) = ulInts;
}

//*****************************************************************************
//
//! Enables generator and fault interrupts for a PWM module.
//!
//! \param ulBase is the base address of the PWM module.
//! \param ulGenFault contains the interrupts to be enabled.  Must be a logical
//! OR of any of \b PWM_INT_GEN_0, \b PWM_INT_GEN_1, \b PWM_INT_GEN_2, or
//! \b PWM_INT_FAULT.
//!
//! Unmasks the specified interrupt(s) by setting the specified bits of
//! the interrupt enable register for the selected PWM module.
//!
//! \return None.
//
//*****************************************************************************
void
PWMIntEnable(unsigned long ulBase, unsigned long ulGenFault)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == PWM_BASE);

    //
    // Read the module's interrupt enable register, and enable interrupts
    // for the specified PWM generators.
    //
    HWREG(ulBase + PWM_O_INTEN) |= ulGenFault;
}

//*****************************************************************************
//
//! Disables generator and fault interrupts for a PWM module.
//!
//! \param ulBase is the base address of the PWM module.
//! \param ulGenFault contains the interrupts to be disabled.  Must be a
//! logical OR of any of \b PWM_INT_GEN_0, \b PWM_INT_GEN_1, \b PWM_INT_GEN_2,
//! or \b PWM_INT_FAULT.
//!
//! Masks the specified interrupt(s) by clearing the specified bits of
//! the interrupt enable register for the selected PWM module.
//!
//! \return None.
//
//*****************************************************************************
void
PWMIntDisable(unsigned long ulBase, unsigned long ulGenFault)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == PWM_BASE);

    //
    // Read the module's interrupt enable register, and disable interrupts
    // for the specified PWM generators.
    //
    HWREG(ulBase + PWM_O_INTEN) &= ~(ulGenFault);
}

//*****************************************************************************
//
//! Clears the fault interrupt for a PWM module.
//!
//! \param ulBase is the base address of the PWM module.
//!
//! Clears the fault interrupt by writing to the appropriate bit of the
//! interrupt status register for the selected PWM module.
//!
//! \return None.
//
//*****************************************************************************
void
PWMFaultIntClear(unsigned long ulBase)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == PWM_BASE);

    //
    // Write the only writeable bit in the module's interrupt register.
    //
    HWREG(ulBase + PWM_O_ISC) = PWM_INT_INTFAULT;
}

//*****************************************************************************
//
//! Gets the interrupt status for a PWM module.
//!
//! \param ulBase is the base address of the PWM module.
//! \param bMasked specifies whether masked or raw interrupt status is
//! returned.
//!
//! If \e bMasked is set as \b true, then the masked interrupt status is
//! returned; otherwise, the raw interrupt status will be returned.
//!
//! \return The current interrupt status, enumerated as a bit field of
//! \b PWM_INT_GEN_0, \b PWM_INT_GEN_1, \b PWM_INT_GEN_2, and \b PWM_INT_FAULT.
//!
//*****************************************************************************
unsigned long
PWMIntStatus(unsigned long ulBase, tBoolean bMasked)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == PWM_BASE);

    //
    // Read and return either the module's raw or enabled interrupt status.
    //
    if(bMasked == true)
    {
        return(HWREG(ulBase + PWM_O_ISC));
    }
    else
    {
        return(HWREG(ulBase + PWM_O_RIS));
    }
}

//*****************************************************************************
//
// Close the Doxygen group.
//! @}
//
//*****************************************************************************

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美午夜寂寞影院| 久久青草国产手机看片福利盒子 | 成人免费视频caoporn| 在线观看成人小视频| 久久免费国产精品| 日欧美一区二区| 99久久99久久精品国产片果冻| 欧美二区在线观看| 亚洲综合一区二区精品导航| 国产馆精品极品| 2022国产精品视频| 日韩精品乱码免费| 欧美亚洲高清一区| 中文字幕一区二区三区在线播放 | 91精品福利视频| 国产亚洲精品aa午夜观看| 日韩av在线播放中文字幕| 在线一区二区三区四区五区 | 成人黄色网址在线观看| 26uuu亚洲综合色欧美 | 精品91自产拍在线观看一区| 午夜免费欧美电影| 欧美色涩在线第一页| 国产精品久久久久影院老司| 国产高清不卡一区二区| 日韩精品一区二区三区swag | 亚洲黄色av一区| 99久久99久久免费精品蜜臀| 国产日韩精品一区二区浪潮av | 日韩精品久久理论片| 欧美日韩黄色一区二区| 午夜精品成人在线| 欧美午夜精品理论片a级按摩| 亚洲一区在线免费观看| 在线观看欧美黄色| 午夜精品123| 91精品国产综合久久久久久久 | 国产偷国产偷精品高清尤物| 九九久久精品视频| 精品区一区二区| 国产九九视频一区二区三区| 精品sm在线观看| 国产美女娇喘av呻吟久久| 久久精品一区四区| 国产盗摄一区二区三区| 中文字幕欧美激情| 97国产精品videossex| 亚洲精选视频在线| 在线播放一区二区三区| 免费观看在线色综合| 精品国产一区二区三区忘忧草 | 国产女人18水真多18精品一级做| 国产激情一区二区三区四区 | 欧美亚洲高清一区二区三区不卡| 亚洲一级片在线观看| 在线综合+亚洲+欧美中文字幕| 日本vs亚洲vs韩国一区三区| 久久精品一区二区三区四区| 97精品国产露脸对白| 日日骚欧美日韩| 国产农村妇女精品| 欧美伊人久久久久久久久影院 | 国产亚洲精品免费| 91视频一区二区三区| 日韩精品视频网| 欧美国产丝袜视频| 欧美日韩性生活| 激情综合一区二区三区| 亚洲视频你懂的| 欧美一区二区三区男人的天堂| 国产91精品入口| 亚洲www啪成人一区二区麻豆| 2023国产一二三区日本精品2022| 色综合一区二区三区| 狠狠色丁香九九婷婷综合五月| 中文一区二区在线观看| 欧美日韩中文字幕精品| 国产精品白丝av| 日本在线观看不卡视频| 中文字幕日韩精品一区 | 国产精品久久久久国产精品日日| 欧美综合一区二区| 成人黄色a**站在线观看| 免费看欧美女人艹b| 一区二区三区精品在线| 久久久久久久一区| 欧美一区永久视频免费观看| 97se亚洲国产综合自在线不卡| 久久精品国产成人一区二区三区 | 美女性感视频久久| 亚洲欧美成aⅴ人在线观看| 欧美一区二区人人喊爽| 91免费观看在线| 国产在线麻豆精品观看| 午夜视黄欧洲亚洲| 一区二区三区四区激情| 国产精品女同一区二区三区| 精品久久久久久久久久久久久久久久久 | 午夜一区二区三区在线观看| 国产欧美日韩在线看| 9191成人精品久久| 欧美日韩一区 二区 三区 久久精品| 成人免费黄色在线| 国产成人av一区二区| 韩国午夜理伦三级不卡影院| 日本成人在线看| 亚洲一区中文日韩| 一区二区三区国产| 一区二区理论电影在线观看| 中文子幕无线码一区tr| 国产人久久人人人人爽| 久久久久久日产精品| 日韩精品在线网站| 久久这里都是精品| 久久综合资源网| 久久综合国产精品| 国产嫩草影院久久久久| 国产精品久久久久久久久久久免费看 | 欧美性xxxxxx少妇| 色88888久久久久久影院按摩| 99久久婷婷国产| 91首页免费视频| 欧美亚洲综合久久| 欧美日韩在线免费视频| 欧美午夜精品免费| 欧美一区2区视频在线观看| 日韩一区二区三区视频在线观看 | 在线免费视频一区二区| 91蜜桃在线观看| 欧美三片在线视频观看| 欧美视频一区二区三区四区| 欧美日本在线看| 日韩精品一区二区三区在线| 久久久噜噜噜久久人人看| 国产精品乱人伦中文| 亚洲欧美日韩中文播放| 亚洲国产精品综合小说图片区| 日本女优在线视频一区二区| 蜜臀久久99精品久久久画质超高清| 国产一区日韩二区欧美三区| 国产成人亚洲综合a∨婷婷图片| 成人福利视频在线看| 色成年激情久久综合| 制服丝袜中文字幕亚洲| 久久天天做天天爱综合色| 国产精品久久一级| 亚洲一区视频在线观看视频| 琪琪久久久久日韩精品| 成人精品免费网站| 欧美日韩国产免费一区二区 | 欧美日本一道本| 久久免费视频色| 亚洲一二三四在线| 韩国欧美国产一区| 欧美性生活大片视频| 久久久综合视频| 亚洲国产美女搞黄色| 国产露脸91国语对白| 欧美性videosxxxxx| 国产日韩欧美在线一区| 丝袜诱惑制服诱惑色一区在线观看| 国产乱理伦片在线观看夜一区| 91论坛在线播放| 久久久欧美精品sm网站| 香港成人在线视频| 成人av在线一区二区三区| 这里只有精品99re| 亚洲激情av在线| 成人午夜电影网站| 日韩欧美一区中文| 午夜欧美大尺度福利影院在线看| 国产成人免费视频网站高清观看视频 | 久久久久久麻豆| 天堂蜜桃一区二区三区 | 亚洲一区二区三区四区的| 国产乱码精品一区二区三区av | 欧美色图片你懂的| 国产精品久久精品日日| 麻豆精品在线看| 欧美欧美欧美欧美首页| 亚洲免费色视频| 成人白浆超碰人人人人| 国产无遮挡一区二区三区毛片日本| 日韩精品一二三四| 精品视频999| 亚洲国产成人高清精品| www.亚洲色图.com| 国产清纯白嫩初高生在线观看91| 蜜臀av一级做a爰片久久| 精品视频在线看| 亚洲午夜久久久久久久久电影网| 9人人澡人人爽人人精品| 中文字幕 久热精品 视频在线 | 3atv在线一区二区三区| 一区二区三区欧美| 久久久亚洲精华液精华液精华液| 久久精品二区亚洲w码| 欧美一区二区三区男人的天堂| 午夜精品福利一区二区三区av | 国产剧情一区二区|