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

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

?? pwm.c

?? KEIL驅動 各方面各 你的看法女士的煩惱 方看到你
?? C
?? 第 1 頁 / 共 5 頁
字號:
//! \sa IntRegister() for important information about registering interrupt
//! handlers.
//!
//! \return None.
//
//*****************************************************************************
void
PWMFaultIntRegister(unsigned long ulBase, void (*pfnIntHandler)(void))
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == PWM_BASE);

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

    //
    // 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, \b PWM_GEN_2, or \b PWM_GEN_3.
//! \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 \e ulIntTrig parameter is the logical OR of
//! \b PWM_INT_CNT_ZERO, \b PWM_INT_CNT_LOAD, \b PWM_INT_CNT_AU,
//! \b PWM_INT_CNT_AD, \b PWM_INT_CNT_BU, \b PWM_INT_CNT_BD,
//! \b PWM_TR_CNT_ZERO, \b PWM_TR_CNT_LOAD, \b PWM_TR_CNT_AU, \b PWM_TR_CNT_AD,
//! \b PWM_TR_CNT_BU, or \b PWM_TR_CNT_BD.
//!
//! \return None.
//
//*****************************************************************************
void
PWMGenIntTrigEnable(unsigned long ulBase, unsigned long ulGen,
                    unsigned long ulIntTrig)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == PWM_BASE);
    ASSERT(PWMGenValid(ulGen));
    ASSERT((ulIntTrig & ~(PWM_INT_CNT_ZERO | PWM_INT_CNT_LOAD |
                          PWM_INT_CNT_AU | PWM_INT_CNT_AD | PWM_INT_CNT_BU |
                          PWM_INT_CNT_BD | PWM_TR_CNT_ZERO | PWM_TR_CNT_LOAD |
                          PWM_TR_CNT_AU | PWM_TR_CNT_AD | PWM_TR_CNT_BU |
                          PWM_TR_CNT_BD)) == 0);

    //
    // 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, \b PWM_GEN_2, or \b PWM_GEN_3.
//! \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 \e ulIntTrig parameter is the logical OR of
//! \b PWM_INT_CNT_ZERO, \b PWM_INT_CNT_LOAD, \b PWM_INT_CNT_AU,
//! \b PWM_INT_CNT_AD, \b PWM_INT_CNT_BU, \b PWM_INT_CNT_BD,
//! \b PWM_TR_CNT_ZERO, \b PWM_TR_CNT_LOAD, \b PWM_TR_CNT_AU, \b PWM_TR_CNT_AD,
//! \b PWM_TR_CNT_BU, or \b PWM_TR_CNT_BD.
//!
//! \return None.
//
//*****************************************************************************
void
PWMGenIntTrigDisable(unsigned long ulBase, unsigned long ulGen,
                     unsigned long ulIntTrig)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == PWM_BASE);
    ASSERT(PWMGenValid(ulGen));
    ASSERT((ulIntTrig & ~(PWM_INT_CNT_ZERO | PWM_INT_CNT_LOAD |
                          PWM_INT_CNT_AU | PWM_INT_CNT_AD | PWM_INT_CNT_BU |
                          PWM_INT_CNT_BD | PWM_TR_CNT_ZERO | PWM_TR_CNT_LOAD |
                          PWM_TR_CNT_AU | PWM_TR_CNT_AD | PWM_TR_CNT_BU |
                          PWM_TR_CNT_BD)) == 0);

    //
    // 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, \b PWM_GEN_2, or \b PWM_GEN_3.
//! \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(PWMGenValid(ulGen));

    //
    // 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, \b PWM_GEN_2, or \b PWM_GEN_3.
//! \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
//! \e ulInts parameter is the logical OR of \b PWM_INT_CNT_ZERO,
//! \b PWM_INT_CNT_LOAD, \b PWM_INT_CNT_AU, \b PWM_INT_CNT_AD,
//! \b PWM_INT_CNT_BU, or \b PWM_INT_CNT_BD.
//!
//! \note Since there is a write buffer in the Cortex-M3 processor, it may take
//! several clock cycles before the interrupt source is actually cleared.
//! Therefore, it is recommended that the interrupt source be cleared early in
//! the interrupt handler (as opposed to the very last action) to avoid
//! returning from the interrupt handler before the interrupt source is
//! actually cleared.  Failure to do so may result in the interrupt handler
//! being immediately reentered (since NVIC still sees the interrupt source
//! asserted).
//!
//! \return None.
//
//*****************************************************************************
void
PWMGenIntClear(unsigned long ulBase, unsigned long ulGen, unsigned long ulInts)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == PWM_BASE);
    ASSERT(PWMGenValid(ulGen));
    ASSERT((ulInts & ~(PWM_INT_CNT_ZERO | PWM_INT_CNT_LOAD | PWM_INT_CNT_AU |
                       PWM_INT_CNT_AD | PWM_INT_CNT_BU | PWM_INT_CNT_BD)) ==
           0);

    //
    // 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,
//! \b PWM_INT_GEN_3, \b PWM_INT_FAULT0, \b PWM_INT_FAULT1, \b PWM_INT_FAULT2,
//! or \b PWM_INT_FAULT3.
//!
//! 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);
    ASSERT((ulGenFault & ~(PWM_INT_GEN_0 | PWM_INT_GEN_1 | PWM_INT_GEN_2 |
                           PWM_INT_GEN_3 | PWM_INT_FAULT0 | PWM_INT_FAULT1 |
                           PWM_INT_FAULT2 | PWM_INT_FAULT3)) == 0);

    //
    // 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,
//! \b PWM_INT_GEN_3, \b PWM_INT_FAULT0, \b PWM_INT_FAULT1, \b PWM_INT_FAULT2,
//! or \b PWM_INT_FAULT3.
//!
//! 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);
    ASSERT((ulGenFault & ~(PWM_INT_GEN_0 | PWM_INT_GEN_1 | PWM_INT_GEN_2 |
                           PWM_INT_GEN_3 | PWM_INT_FAULT0 | PWM_INT_FAULT1 |
                           PWM_INT_FAULT2 | PWM_INT_FAULT3)) == 0);

    //
    // 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.
//!
//! This function clears only the FAULT0 interrupt and is retained for
//! backwards compatibility.  It is recommended that PWMFaultIntClearExt() be
//! used instead since it supports all fault interrupts supported on devices
//! with and without extended PWM fault handling support.
//!
//! \note Since there is a write buffer in the Cortex-M3 processor, it may take
//! several clock cycles before the interrupt source is actually cleared.
//! Therefore, it is recommended that the interrupt source be cleared early in
//! the interrupt handler (as opposed to the very last action) to avoid
//! returning from the interrupt handler before the interrupt source is
//! actually cleared.  Failure to do so may result in the interrupt handler
//! being immediately reentered (since NVIC still sees the interrupt source
//! asserted).
//!
//! \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.
    //

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产中文| 日韩精品午夜视频| 成人av网在线| 国产精品欧美久久久久无广告 | 亚洲黄色av一区| 在线精品视频免费观看| 亚洲va欧美va国产va天堂影院| 欧美影院一区二区| 日本成人在线不卡视频| 精品日韩av一区二区| 国产成人免费网站| 中文字幕一区二区三区四区 | 国产乱码一区二区三区| 久久精品一区二区三区av| 成人黄色在线网站| 亚洲一区二区视频| 精品剧情在线观看| 成人免费视频视频在线观看免费| 亚洲免费观看视频| 欧美一级一级性生活免费录像| 国产一区日韩二区欧美三区| 成人欧美一区二区三区| 555夜色666亚洲国产免| 国产激情视频一区二区在线观看| 亚洲青青青在线视频| 欧美岛国在线观看| 91免费观看视频在线| 日韩精品一卡二卡三卡四卡无卡| 久久久久久亚洲综合| 欧美主播一区二区三区美女| 国产在线精品一区二区不卡了| 自拍偷拍国产亚洲| 欧美大肚乱孕交hd孕妇| 91在线视频网址| 美女在线一区二区| 日韩毛片精品高清免费| 欧美成人综合网站| 欧美午夜一区二区三区免费大片| 极品少妇一区二区三区精品视频 | 国产精品日韩精品欧美在线| 色婷婷综合久久久久中文 | 日韩一区二区三区精品视频| 成人18视频在线播放| 亚洲综合丁香婷婷六月香| 国产欧美精品一区aⅴ影院| 91社区在线播放| 韩国精品在线观看| 一区二区三区四区不卡在线| 国产亚洲女人久久久久毛片| 91久久国产综合久久| 国产乱子伦视频一区二区三区 | 一区二区三区视频在线看| 久久久精品国产免费观看同学| 91国偷自产一区二区开放时间| 国产精品夜夜爽| 亚洲第四色夜色| 综合在线观看色| 欧美videos大乳护士334| 在线免费不卡电影| 成人永久看片免费视频天堂| 六月婷婷色综合| 亚洲一区二区欧美日韩| 亚洲情趣在线观看| 国产色产综合产在线视频| 在线一区二区观看| 国产成人精品三级| 亚洲成人动漫在线免费观看| 国产精品电影一区二区三区| 欧美成人性战久久| 欧美电影免费提供在线观看| 欧美天天综合网| 欧美中文字幕久久| av亚洲精华国产精华精华| 粉嫩av一区二区三区在线播放| 日本免费新一区视频| 1024亚洲合集| 国产精品亲子伦对白| 自拍偷拍国产精品| 国产精品色眯眯| 亚洲欧美日本韩国| 久久久久国产精品麻豆| 久久久久国产精品人| 久久夜色精品国产噜噜av| 久久久噜噜噜久噜久久综合| 日韩一二三区不卡| 精品久久五月天| 日韩欧美久久一区| 久久久亚洲精品一区二区三区| 日韩欧美中文字幕精品| 精品久久国产字幕高潮| 欧美不卡视频一区| 国产日韩欧美a| 日本一区二区三区在线不卡 | 国产综合久久久久影院| 男女男精品视频网| 国产精品综合在线视频| 国产福利一区二区| aaa欧美大片| 91猫先生在线| 欧美喷潮久久久xxxxx| 欧美区一区二区三区| 精品久久久影院| 久久这里只有精品首页| 亚洲欧洲av一区二区三区久久| 国产精品美日韩| 亚洲一卡二卡三卡四卡五卡| 亚洲第一搞黄网站| 国产揄拍国内精品对白| 丁香一区二区三区| 欧美性色黄大片手机版| 欧美日韩一区不卡| 亚洲精品一区二区三区香蕉| 亚洲国产精品二十页| 一区二区三区在线不卡| 亚洲国产欧美日韩另类综合| 精品一区二区免费视频| 国产高清久久久| 99riav久久精品riav| 日本精品免费观看高清观看| 日韩精品专区在线影院重磅| 久久亚洲精品小早川怜子| 国产精品网曝门| 亚洲国产一区视频| 国产美女视频一区| 91丨九色porny丨蝌蚪| 欧美成人一区二区三区片免费 | 在线播放中文一区| 国产免费观看久久| 亚洲一区二区三区视频在线播放| 免费黄网站欧美| 成人综合婷婷国产精品久久| 欧美蜜桃一区二区三区| 亚洲精品一区二区三区在线观看| 伊人色综合久久天天人手人婷| 男人的天堂久久精品| 欧美性大战久久久| 久久九九影视网| 亚洲成人免费观看| 国产精品中文字幕欧美| av电影天堂一区二区在线观看| 92国产精品观看| 精品欧美久久久| 肉色丝袜一区二区| 成人久久视频在线观看| 精品日产卡一卡二卡麻豆| 亚洲免费视频中文字幕| 国产成人精品一区二| 制服丝袜中文字幕亚洲| 一区二区三区欧美激情| 国产一区欧美二区| 精品国产成人系列| 天天综合色天天| 欧美嫩在线观看| 亚洲免费在线看| 色综合久久天天综合网| 久久视频一区二区| 精品一区二区三区蜜桃| 加勒比av一区二区| 在线观看亚洲成人| 亚洲精品成人天堂一二三| 人妖欧美一区二区| 91精品婷婷国产综合久久性色| 中文字幕在线视频一区| 成人激情午夜影院| 26uuu精品一区二区| 国产酒店精品激情| 精品日韩一区二区| 国内偷窥港台综合视频在线播放| 欧美性猛片xxxx免费看久爱| 亚洲精品久久久蜜桃| 国产黄色成人av| 成人欧美一区二区三区白人| 高清不卡在线观看| 中文字幕在线不卡| 国产自产高清不卡| 国产欧美日韩精品一区| 免费看欧美美女黄的网站| 欧美另类高清zo欧美| 蜜桃精品视频在线观看| 欧美一区二区三区视频免费| 久久99精品久久只有精品| 337p亚洲精品色噜噜噜| 韩国精品免费视频| 久久人人爽爽爽人久久久| 国产不卡免费视频| 欧美国产日韩a欧美在线观看 | 国产精一区二区三区| 国产精品久久久久影院亚瑟| 成人午夜视频在线观看| 依依成人综合视频| 欧美中文字幕一区二区三区| 日日骚欧美日韩| 欧美午夜在线观看| 蜜臀av一区二区在线免费观看| 2021国产精品久久精品| 国产精品自拍一区| 亚洲欧美日本韩国| 欧美乱妇一区二区三区不卡视频| 国产一区视频导航| 国产精品灌醉下药二区|