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

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

?? hibernate.c

?? STM32+Grlib
?? C
?? 第 1 頁 / 共 3 頁
字號:
            //
            HibernateWriteComplete();
        }
    }
}

//*****************************************************************************
//
//! Reads a set of data from the non-volatile memory of the Hibernation module.
//!
//! \param pulData points to a location where the data that is read from the
//! Hibernation module will be stored.
//! \param ulCount is the count of 32-bit words to read.
//!
//! Retrieves a set of data from the Hibernation module non-volatile memory
//! that was previously stored with the HibernateDataSet() function.  The
//! caller must ensure that \e pulData points to a large enough memory block to
//! hold all the data that is read from the non-volatile memory.
//!
//! \return None.
//
//*****************************************************************************
void
HibernateDataGet(unsigned long *pulData, unsigned long ulCount)
{
    unsigned int uIdx;

    //
    // Check the arguments.
    //
    ASSERT(ulCount <= 64);
    ASSERT(pulData != 0);

    //
    // Loop through all the words to be restored, reading one at a time.
    //
    for(uIdx = 0; uIdx < ulCount; uIdx++)
    {
        //
        // Read a word from the non-volatile storage area.  No delay is
        // required between reads.
        //
        pulData[uIdx] = HWREG(HIB_DATA + (uIdx * 4));
    }
}

//*****************************************************************************
//
//! Requests hibernation mode.
//!
//! This function requests the Hibernation module to disable the external
//! regulator, thus removing power from the processor and all peripherals.  The
//! Hibernation module will remain powered from the battery or auxiliary power
//! supply.
//!
//! The Hibernation module will re-enable the external regulator when one of
//! the configured wake conditions occurs (such as RTC match or external
//! \b WAKE pin).  When the power is restored the processor will go through a
//! normal power-on reset.  The processor can retrieve saved state information
//! with the HibernateDataGet() function.  Prior to calling the function to
//! request hibernation mode, the conditions for waking must have already been
//! set by using the HibernateWakeSet() function.
//!
//! Note that this function may return because some time may elapse before the
//! power is actually removed, or it may not be removed at all.  For this
//! reason, the processor will continue to execute instructions for some time
//! and the caller should be prepared for this function to return.  There are
//! various reasons why the power may not be removed.  For example, if the
//! HibernateLowBatSet() function was used to configure an abort if low
//! battery is detected, then the power will not be removed if the battery
//! voltage is too low.  There may be other reasons, related to the external
//! circuit design, that a request for hibernation may not actually occur.
//!
//! For all these reasons, the caller must be prepared for this function to
//! return.  The simplest way to handle it is to just enter an infinite loop
//! and wait for the power to be removed.
//!
//! \return None.
//
//*****************************************************************************
void
HibernateRequest(void)
{
    //
    // Set the bit in the control register to cut main power to the processor.
    //
    HWREG(HIB_CTL) |= HIB_CTL_HIBREQ;
}

//*****************************************************************************
//
//! Enables interrupts for the Hibernation module.
//!
//! \param ulIntFlags is the bit mask of the interrupts to be enabled.
//!
//! Enables the specified interrupt sources from the Hibernation module.
//!
//! The \e ulIntFlags parameter must be the logical OR of any combination of
//! the following:
//!
//! - \b HIBERNATE_INT_PIN_WAKE - wake from pin interrupt
//! - \b HIBERNATE_INT_LOW_BAT - low battery interrupt
//! - \b HIBERNATE_INT_RTC_MATCH_0 - RTC match 0 interrupt
//! - \b HIBERNATE_INT_RTC_MATCH_1 - RTC match 1 interrupt
//!
//! \return None.
//
//*****************************************************************************
void
HibernateIntEnable(unsigned long ulIntFlags)
{
    //
    // Check the arguments.
    //
    ASSERT(!(ulIntFlags & ~(HIBERNATE_INT_PIN_WAKE | HIBERNATE_INT_LOW_BAT |
                            HIBERNATE_INT_RTC_MATCH_0 |
                            HIBERNATE_INT_RTC_MATCH_1)));

    //
    // Set the specified interrupt mask bits.
    //
    HWREG(HIB_IM) |= ulIntFlags;
}

//*****************************************************************************
//
//! Disables interrupts for the Hibernation module.
//!
//! \param ulIntFlags is the bit mask of the interrupts to be disabled.
//!
//! Disables the specified interrupt sources from the Hibernation module.
//!
//! The \e ulIntFlags parameter has the same definition as the \e ulIntFlags
//! parameter to the HibernateIntEnable() function.
//!
//! \return None.
//
//*****************************************************************************
void
HibernateIntDisable(unsigned long ulIntFlags)
{
    //
    // Check the arguments.
    //
    ASSERT(!(ulIntFlags & ~(HIBERNATE_INT_PIN_WAKE | HIBERNATE_INT_LOW_BAT |
                            HIBERNATE_INT_RTC_MATCH_0 |
                            HIBERNATE_INT_RTC_MATCH_1)));

    //
    // Clear the specified interrupt mask bits.
    //
    HWREG(HIB_IM) &= ~ulIntFlags;
}

//*****************************************************************************
//
//! Registers an interrupt handler for the Hibernation module interrupt.
//!
//! \param pfnHandler points to the function to be called when a hibernation
//! interrupt occurs.
//!
//! Registers the interrupt handler in the system interrupt controller.  The
//! interrupt is enabled at the global level, but individual interrupt sources
//! must still be enabled with a call to HibernateIntEnable().
//!
//! \sa IntRegister() for important information about registering interrupt
//! handlers.
//!
//! \return None.
//
//*****************************************************************************
void
HibernateIntRegister(void (*pfnHandler)(void))
{
    //
    // Register the interrupt handler.
    //
    IntRegister(INT_HIBERNATE, pfnHandler);

    //
    // Enable the hibernate module interrupt.
    //
    IntEnable(INT_HIBERNATE);
}

//*****************************************************************************
//
//! Unregisters an interrupt handler for the Hibernation module interrupt.
//!
//! Unregisters the interrupt handler in the system interrupt controller.  The
//! interrupt is disabled at the global level, and the interrupt handler will
//! no longer be called.
//!
//! \sa IntRegister() for important information about registering interrupt
//! handlers.
//!
//! \return None.
//
//*****************************************************************************
void
HibernateIntUnregister(void)
{
    //
    // Disable the hibernate interrupt.
    //
    IntDisable(INT_HIBERNATE);

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

//*****************************************************************************
//
//! Gets the current interrupt status of the Hibernation module.
//!
//! \param bMasked is false to retrieve the raw interrupt status, and true to
//! retrieve the masked interrupt status.
//!
//! Returns the interrupt status of the Hibernation module.  The caller can use
//! this to determine the cause of a hibernation interrupt.  Either the masked
//! or raw interrupt status can be returned.
//!
//! \return Returns the interrupt status as a bit field with the values as
//! described in the HibernateIntEnable() function.
//
//*****************************************************************************
unsigned long
HibernateIntStatus(tBoolean bMasked)
{
    //
    // Read and return the Hibernation module raw or masked interrupt status.
    //
    if(bMasked == true)
    {
        return(HWREG(HIB_MIS) & 0xf);
    }
    else
    {
        return(HWREG(HIB_RIS) & 0xf);
    }
}

//*****************************************************************************
//
//! Clears pending interrupts from the Hibernation module.
//!
//! \param ulIntFlags is the bit mask of the interrupts to be cleared.
//!
//! Clears the specified interrupt sources.  This must be done from within the
//! interrupt handler or else the handler will be called again upon exit.
//!
//! The \e ulIntFlags parameter has the same definition as the \e ulIntFlags
//! parameter to the HibernateIntEnable() function.
//!
//! \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
HibernateIntClear(unsigned long ulIntFlags)
{
    //
    // Check the arguments.
    //
    ASSERT(!(ulIntFlags & ~(HIBERNATE_INT_PIN_WAKE | HIBERNATE_INT_LOW_BAT |
                            HIBERNATE_INT_RTC_MATCH_0 |
                            HIBERNATE_INT_RTC_MATCH_1)));

    //
    // Write the specified interrupt bits into the interrupt clear register.
    //
    HWREG(HIB_IC) |= ulIntFlags;
}

//*****************************************************************************
//
//! Checks to see if the Hibernation module is already powered up.
//!
//! This function queries the control register to determine if the module is
//! already active.  This function can be called at a power-on reset to help
//! determine if the reset is due to a wake from hibernation or a cold start.
//! If the Hibernation module is already active, then it does not need to be
//! re-enabled and its status can be queried immediately.
//!
//! The software application should also use the HibernateIntStatus() function
//! to read the raw interrupt status to determine the cause of the wake.  The
//! HibernateDataGet() function can be used to restore state.  These
//! combinations of functions can be used by the software to determine if the
//! processor is waking from hibernation and the appropriate action to take as
//! a result.
//!
//! \return Returns \b true if the module is already active, and \b false if
//! not.
//
//*****************************************************************************
unsigned int
HibernateIsActive(void)
{
    //
    // Read the control register, and return true if the module is enabled.
    //
    return(HWREG(HIB_CTL) & HIB_CTL_CLK32EN ? 1 : 0);
}

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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲人成网站在线| 日韩西西人体444www| 国产成人av电影在线| 久久99精品视频| 国产成人aaa| bt欧美亚洲午夜电影天堂| 国产成人午夜片在线观看高清观看| 国产乱子伦视频一区二区三区| 蓝色福利精品导航| 国内精品国产三级国产a久久| 久久99精品久久久久久国产越南| 国产成人一区在线| 欧美三区在线观看| 欧美一级一区二区| 国产精品理论片| 伊人夜夜躁av伊人久久| 丝袜亚洲另类丝袜在线| 国产一区二区三区观看| 91在线视频官网| 欧美成人vr18sexvr| 亚洲国产高清在线| 性做久久久久久久久| 国产99精品在线观看| 99re成人在线| 久久色在线视频| 亚洲午夜在线视频| 大美女一区二区三区| 日韩欧美专区在线| 亚洲一线二线三线视频| 久久99国内精品| 欧美日韩一区二区三区在线| 国产亚洲成aⅴ人片在线观看| 亚洲综合在线电影| 不卡的电影网站| 久久久国产精华| 奇米综合一区二区三区精品视频| 欧美性色欧美a在线播放| 亚洲欧洲日产国码二区| 国产成人午夜99999| 欧美一区二区视频观看视频| 亚洲精品高清视频在线观看| 91在线观看高清| 亚洲色图欧洲色图婷婷| 91视频观看视频| 亚洲精品视频免费看| 一本高清dvd不卡在线观看| 国产欧美精品一区二区色综合 | 成人午夜免费av| 久久久精品黄色| 91丝袜呻吟高潮美腿白嫩在线观看| 久久久久久久久久看片| 国产一区高清在线| 国产女主播在线一区二区| 99国产精品一区| 日韩高清不卡一区| 精品免费国产二区三区| 成人免费av网站| 久久久一区二区| av影院午夜一区| 日精品一区二区三区| 国产女同互慰高潮91漫画| 99久久久国产精品免费蜜臀| 亚洲国产日韩在线一区模特| 亚洲精品一区二区三区精华液 | 久久精品国产亚洲高清剧情介绍 | 亚洲激情五月婷婷| 91老师片黄在线观看| 亚洲人亚洲人成电影网站色| 欧美在线一二三| 美女精品自拍一二三四| 国产片一区二区| 日韩三级.com| 91久久精品午夜一区二区| 不卡一卡二卡三乱码免费网站| 国产在线国偷精品免费看| 男女男精品视频网| 日本欧美韩国一区三区| 偷拍与自拍一区| 欧美r级电影在线观看| 色综合欧美在线视频区| 大桥未久av一区二区三区中文| 麻豆精品视频在线| 国产精品午夜免费| 91麻豆国产福利在线观看| 91福利在线免费观看| 欧美刺激午夜性久久久久久久| 欧美综合一区二区三区| 欧美日韩一区二区三区高清| 欧美综合一区二区| 91麻豆精品国产无毒不卡在线观看 | 国产精品欧美一级免费| 国产精品福利一区二区| 久久久精品综合| 国产高清精品网站| 国产精品18久久久久久久久| 99久久精品国产导航| 欧美日本在线观看| 精品久久久久久综合日本欧美| 国产日产欧美一区| 亚洲午夜私人影院| 国产成人在线观看免费网站| 欧美三级午夜理伦三级中视频| 精品三级在线看| 三级不卡在线观看| 色呦呦国产精品| 亚洲免费成人av| 99久久久精品免费观看国产蜜| 欧美成人高清电影在线| 亚洲免费成人av| 91亚洲国产成人精品一区二三| 在线综合亚洲欧美在线视频| 综合电影一区二区三区 | 欧美综合亚洲图片综合区| 国产午夜精品一区二区三区视频 | 中文字幕免费不卡| 激情av综合网| 日韩视频不卡中文| 婷婷综合五月天| 7777精品久久久大香线蕉| 香蕉av福利精品导航| 欧美天堂一区二区三区| 亚洲视频中文字幕| 99精品桃花视频在线观看| 久久九九久久九九| 国产成人免费9x9x人网站视频| 精品国产精品网麻豆系列| 国产乱一区二区| 国产精品―色哟哟| 不卡的电视剧免费网站有什么| 中文字幕一区二区日韩精品绯色| 成人免费毛片a| 亚洲综合av网| 在线播放欧美女士性生活| 三级成人在线视频| 精品福利av导航| 91碰在线视频| 亚洲3atv精品一区二区三区| 日韩欧美成人激情| 成人美女在线视频| 亚洲国产精品自拍| 精品国免费一区二区三区| 丁香婷婷综合五月| 亚洲国产日韩a在线播放性色| 欧美二区乱c少妇| 国产一区二区视频在线| 亚洲最色的网站| 国产拍欧美日韩视频二区| 欧美午夜不卡在线观看免费| 国产九九视频一区二区三区| 亚洲六月丁香色婷婷综合久久 | 最近日韩中文字幕| 欧美精品丝袜中出| 91美女蜜桃在线| 国产大陆亚洲精品国产| 日韩精品乱码免费| 亚洲色图另类专区| 久久久久久久网| 精品少妇一区二区三区免费观看| 一本色道久久加勒比精品 | 久久亚洲一区二区三区明星换脸| 欧美三级午夜理伦三级中视频| 成人综合婷婷国产精品久久蜜臀 | 精品视频色一区| 在线视频欧美精品| 色综合久久久久| 成人国产精品免费观看| 国产激情91久久精品导航 | 久久奇米777| 精品少妇一区二区三区视频免付费| 欧洲视频一区二区| 欧美日韩国产首页在线观看| 日本精品一区二区三区四区的功能| 成人av网址在线| 一本久道中文字幕精品亚洲嫩| 99久久婷婷国产| 欧美在线free| 欧美精品日韩一区| 精品国产免费视频| 国产三级精品三级在线专区| 中文字幕av不卡| 亚洲电影在线播放| 蜜臀av一区二区在线观看 | 777色狠狠一区二区三区| 欧美成人a在线| 亚洲视频免费在线| 久久精品二区亚洲w码| 韩国一区二区在线观看| 99久久久国产精品免费蜜臀| 欧美日韩高清一区二区| 国产亚洲成aⅴ人片在线观看| 亚洲午夜激情网站| 韩国v欧美v亚洲v日本v| 91高清视频在线| 久久久久久久精| 亚洲va欧美va人人爽午夜| 成人免费毛片片v| 精品理论电影在线| 一区二区在线观看视频| 国产不卡视频一区| 日韩女优av电影|