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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? hibernate.c

?? STM32+Grlib
?? C
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
//*****************************************************************************
//
// hibernate.c - Driver for the Hibernation module
//
// Copyright (c) 2007-2010 Texas Instruments Incorporated.  All rights reserved.
// Software License Agreement
// 
// Texas Instruments (TI) is supplying this software for use solely and
// exclusively on TI's microcontroller products. The software is owned by
// TI and/or its suppliers, and is protected under applicable copyright
// laws. You may not combine this software with "viral" open-source
// software in order to form a larger program.
// 
// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS.
// NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT
// NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY
// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
// DAMAGES, FOR ANY REASON WHATSOEVER.
// 
// This is part of revision 5821 of the Stellaris Peripheral Driver Library.
//
//*****************************************************************************

//*****************************************************************************
//
//! \addtogroup hibernate_api
//! @{
//
//*****************************************************************************

#include "inc/hw_hibernate.h"
#include "inc/hw_ints.h"
#include "inc/hw_sysctl.h"
#include "inc/hw_types.h"
#include "driverlib/debug.h"
#include "driverlib/hibernate.h"
#include "driverlib/interrupt.h"
#include "driverlib/sysctl.h"

//*****************************************************************************
//
// The delay in microseconds for writing to the Hibernation module registers.
//
//*****************************************************************************
#define DELAY_USECS             95

//*****************************************************************************
//
// The number of processor cycles to execute one pass of the delay loop.
//
//*****************************************************************************
#define LOOP_CYCLES             3

//*****************************************************************************
//
// The calculated number of delay loops to achieve the write delay.
//
//*****************************************************************************
static unsigned long g_ulWriteDelay;

//*****************************************************************************
//
//! \internal
//!
//! Polls until the write complete (WRC) bit in the hibernate control register
//! is set.
//!
//! \param None.
//!
//! On non-Fury-class devices, the hibernate module provides an indication when
//! any write is completed.  This is used to pace writes to the module.  This
//! function merely polls this bit and returns as soon as it is set.  At this
//! point, it is safe to perform another write to the module.
//!
//! \return None.
//
//*****************************************************************************
void
HibernateWriteComplete(void)
{
    //
    // Spin until the write complete bit is set.
    //
    while(!(HWREG(HIB_CTL) & HIB_CTL_WRC))
    {
    }
}

//*****************************************************************************
//
//! Enables the Hibernation module for operation.
//!
//! \param ulHibClk is the rate of the clock supplied to the Hibernation
//! module.
//!
//! Enables the Hibernation module for operation.  This function should be
//! called before any of the Hibernation module features are used.
//!
//! The peripheral clock will be the same as the processor clock.  This will be
//! the value returned by SysCtlClockGet(), or it can be explicitly hard-coded
//! if it is constant and known (to save the code/execution overhead of a call
//! to SysCtlClockGet()).
//!
//! This function replaces the original HibernateEnable() API and performs the
//! same actions.  A macro is provided in <tt>hibernate.h</tt> to map the
//! original API to this API.
//!
//! \return None.
//
//*****************************************************************************
void
HibernateEnableExpClk(unsigned long ulHibClk)
{
    //
    // Turn on the clock enable bit.
    //
    HWREG(HIB_CTL) |= HIB_CTL_CLK32EN;

    //
    // For Fury-class devices, compute the number of delay loops that must be
    // used to achieve the desired delay for writes to the hibernation
    // registers.  This value will be used in calls to SysCtlDelay().
    //
    if(CLASS_IS_FURY)
    {
        g_ulWriteDelay = (((ulHibClk / 1000) * DELAY_USECS) /
                          (1000L * LOOP_CYCLES));
        g_ulWriteDelay++;
    }
}

//*****************************************************************************
//
//! Disables the Hibernation module for operation.
//!
//! Disables the Hibernation module for operation.  After this function is
//! called, none of the Hibernation module features are available.
//!
//! \return None.
//
//*****************************************************************************
void
HibernateDisable(void)
{
    //
    // Turn off the clock enable bit.
    //
    HWREG(HIB_CTL) &= ~HIB_CTL_CLK32EN;
}

//*****************************************************************************
//
//! Selects the clock input for the Hibernation module.
//!
//! \param ulClockInput specifies the clock input.
//!
//! Configures the clock input for the Hibernation module.  The configuration
//! option chosen depends entirely on hardware design.  The clock input for the
//! module will either be a 32.768 kHz oscillator or a 4.194304 MHz crystal.
//! The \e ulClockFlags parameter must be one of the following:
//!
//! - \b HIBERNATE_CLOCK_SEL_RAW - use the raw signal from a 32.768 kHz
//!   oscillator.
//! - \b HIBERNATE_CLOCK_SEL_DIV128 - use the crystal input, divided by 128.
//!
//! \return None.
//
//*****************************************************************************
void
HibernateClockSelect(unsigned long ulClockInput)
{
    //
    // Check the arguments.
    //
    ASSERT((ulClockInput == HIBERNATE_CLOCK_SEL_RAW) ||
           (ulClockInput == HIBERNATE_CLOCK_SEL_DIV128));

    //
    // Set the clock selection bit according to the parameter.
    //
    HWREG(HIB_CTL) = ulClockInput | (HWREG(HIB_CTL) & ~HIB_CTL_CLKSEL);
}

//*****************************************************************************
//
//! Enables the RTC feature of the Hibernation module.
//!
//! Enables the RTC in the Hibernation module.  The RTC can be used to wake the
//! processor from hibernation at a certain time, or to generate interrupts at
//! certain times.  This function must be called before using any of the RTC
//! features of the Hibernation module.
//!
//! \return None.
//
//*****************************************************************************
void
HibernateRTCEnable(void)
{
    //
    // Turn on the RTC enable bit.
    //
    HWREG(HIB_CTL) |= HIB_CTL_RTCEN;
}

//*****************************************************************************
//
//! Disables the RTC feature of the Hibernation module.
//!
//! Disables the RTC in the Hibernation module.  After calling this function
//! the RTC features of the Hibernation module will not be available.
//!
//! \return None.
//
//*****************************************************************************
void
HibernateRTCDisable(void)
{
    //
    // Turn off the RTC enable bit.
    //
    HWREG(HIB_CTL) &= ~HIB_CTL_RTCEN;
}

//*****************************************************************************
//
//! Configures the wake conditions for the Hibernation module.
//!
//! \param ulWakeFlags specifies which conditions should be used for waking.
//!
//! Enables the conditions under which the Hibernation module will wake.  The
//! \e ulWakeFlags parameter is the logical OR of any combination of the
//! following:
//!
//! - \b HIBERNATE_WAKE_PIN - wake when the external wake pin is asserted.
//! - \b HIBERNATE_WAKE_RTC - wake when one of the RTC matches occurs.
//!
//! \return None.
//
//*****************************************************************************
void
HibernateWakeSet(unsigned long ulWakeFlags)
{
    //
    // Check the arguments.
    //
    ASSERT(!(ulWakeFlags & ~(HIBERNATE_WAKE_PIN | HIBERNATE_WAKE_RTC)));

    //
    // Set the specified wake flags in the control register.
    //
    HWREG(HIB_CTL) = (ulWakeFlags |
                      (HWREG(HIB_CTL) &
                       ~(HIBERNATE_WAKE_PIN | HIBERNATE_WAKE_RTC)));
}

//*****************************************************************************
//
//! Gets the currently configured wake conditions for the Hibernation module.
//!
//! Returns the flags representing the wake configuration for the Hibernation
//! module.  The return value will be a combination of the following flags:
//!
//! - \b HIBERNATE_WAKE_PIN - wake when the external wake pin is asserted.
//! - \b HIBERNATE_WAKE_RTC - wake when one of the RTC matches occurs.
//!
//! \return Returns flags indicating the configured wake conditions.
//
//*****************************************************************************
unsigned long
HibernateWakeGet(void)
{
    //
    // Read the wake bits from the control register and return
    // those bits to the caller.
    //
    return(HWREG(HIB_CTL) & (HIBERNATE_WAKE_PIN | HIBERNATE_WAKE_RTC));
}

//*****************************************************************************
//
//! Configures the low battery detection.
//!
//! \param ulLowBatFlags specifies behavior of low battery detection.
//!
//! Enables the low battery detection and whether hibernation is allowed if a
//! low battery is detected.  If low battery detection is enabled, then a low
//! battery condition will be indicated in the raw interrupt status register,
//! and can also trigger an interrupt.  Optionally, hibernation can be aborted
//! if a low battery is detected.
//!
//! The \e ulLowBatFlags parameter is one of the following values:
//!
//! - \b HIBERNATE_LOW_BAT_DETECT - detect a low battery condition.
//! - \b HIBERNATE_LOW_BAT_ABORT - detect a low battery condition, and abort
//!   hibernation if low battery is detected.
//!
//! \return None.
//
//*****************************************************************************
void
HibernateLowBatSet(unsigned long ulLowBatFlags)
{
    //
    // Check the arguments.
    //
    ASSERT((ulLowBatFlags == HIBERNATE_LOW_BAT_DETECT) ||
           (ulLowBatFlags == HIBERNATE_LOW_BAT_ABORT));

    //
    // Set the low battery detect and abort bits in the control register,
    // according to the parameter.
    //
    HWREG(HIB_CTL) = (ulLowBatFlags |
                      (HWREG(HIB_CTL) & ~HIBERNATE_LOW_BAT_ABORT));
}

//*****************************************************************************
//
//! Gets the currently configured low battery detection behavior.
//!

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品久久精品| 在线不卡中文字幕| 国产999精品久久久久久绿帽| 男人的j进女人的j一区| 日韩高清一级片| 性欧美疯狂xxxxbbbb| 亚洲成人黄色影院| 欧美视频一区二区三区四区| 91色.com| 欧美性大战久久久久久久蜜臀| 色噜噜偷拍精品综合在线| 色狠狠桃花综合| 91黄色免费看| 3atv在线一区二区三区| 日韩一区二区三区免费观看| 日韩三级视频在线观看| 精品国产伦一区二区三区观看方式 | 91视频精品在这里| 99在线视频精品| 亚洲欧洲韩国日本视频| 亚洲免费在线视频| 亚洲第一福利一区| 麻豆传媒一区二区三区| 国产成人精品网址| 91麻豆国产精品久久| 欧美性淫爽ww久久久久无| 91精品视频网| 国产无人区一区二区三区| 国产三区在线成人av| 国产精品灌醉下药二区| 亚洲已满18点击进入久久| 日韩激情视频网站| 国产九色精品成人porny| 99vv1com这只有精品| 欧美人与z0zoxxxx视频| 91.成人天堂一区| 久久疯狂做爰流白浆xx| 国产成人小视频| 色国产综合视频| 7777精品伊人久久久大香线蕉| 精品国产成人系列| 亚洲欧美综合另类在线卡通| 亚洲午夜国产一区99re久久| 蜜桃91丨九色丨蝌蚪91桃色| 风间由美一区二区av101 | www国产精品av| 亚洲欧美日韩久久| 日本vs亚洲vs韩国一区三区| 国产成人在线网站| 欧美日本一区二区| 日本一区二区三区四区| 色成人在线视频| 欧美福利视频导航| 中文字幕免费观看一区| 亚洲成av人片在线观看| 粉嫩aⅴ一区二区三区四区五区| 欧美午夜一区二区三区| 欧美国产日韩a欧美在线观看| 午夜日韩在线观看| 懂色av一区二区夜夜嗨| 6080yy午夜一二三区久久| 中文一区二区完整视频在线观看| 午夜伊人狠狠久久| 99久久精品免费看国产免费软件| 91精品欧美一区二区三区综合在| 国产精品久久夜| 久久91精品久久久久久秒播| 欧美午夜电影网| 国产精品乱码人人做人人爱| 欧美xxxxx牲另类人与| 亚洲人成7777| 国产一区二区三区视频在线播放| 欧美日韩亚洲丝袜制服| 国产精品成人在线观看| 精品一区二区三区欧美| 欧美高清激情brazzers| 亚洲精品国产a| 不卡视频一二三| 国产午夜亚洲精品不卡| 经典三级一区二区| 91精品国产综合久久久久| 亚洲黄色av一区| av一区二区三区黑人| 久久久亚洲精华液精华液精华液| 亚洲成av人片在线观看无码| 91在线观看成人| 日本一区二区电影| 国产一区 二区| 日本亚洲最大的色成网站www| 欧美最猛黑人xxxxx猛交| 美女看a上一区| 欧美少妇性性性| 亚洲一区二区四区蜜桃| 色视频一区二区| 日韩免费性生活视频播放| 亚洲成人av一区二区三区| 在线免费观看一区| 亚洲精品国产无天堂网2021| 97精品视频在线观看自产线路二| 国产三级一区二区| 国产另类ts人妖一区二区| 2024国产精品| 国产精品99久| 中文av字幕一区| 成人爽a毛片一区二区免费| 国产欧美精品一区二区色综合| 日韩欧美综合在线| 蜜桃视频免费观看一区| 欧美一区二区三区视频免费播放 | 国产99久久久久| 久久久久久久网| 粉嫩嫩av羞羞动漫久久久 | 亚洲图片欧美一区| 欧美特级限制片免费在线观看| 亚洲亚洲精品在线观看| 69成人精品免费视频| 蜜臀精品一区二区三区在线观看| 欧美电影免费观看高清完整版| 久久精品免费观看| 久久久精品国产免大香伊| 成人福利视频在线看| 亚洲一区二区三区四区五区黄| 一区二区三区在线观看网站| 欧美色老头old∨ideo| 日韩高清国产一区在线| 欧美大片一区二区| 国产福利电影一区二区三区| 国产精品理论片在线观看| 91麻豆精品秘密| 五月天丁香久久| 久久亚洲春色中文字幕久久久| 国产精品一二三| 亚洲女爱视频在线| 91精品国产丝袜白色高跟鞋| 国产麻豆成人精品| 1024精品合集| 欧美一区二区三区在线观看| 精品一区二区在线观看| 中文字幕高清一区| 欧美视频一区二区三区四区| 国产一区二区三区免费看 | 中文字幕在线观看一区二区| 91老师片黄在线观看| 亚洲成av人在线观看| 久久久亚洲精华液精华液精华液| 一本大道久久a久久精二百| 日韩高清在线不卡| 国产精品久久久久一区二区三区 | 久久久久久亚洲综合影院红桃| 99久久精品免费观看| 麻豆91在线播放| 亚洲欧美福利一区二区| 精品国产免费视频| 91久久精品网| 国产一区二区中文字幕| 怡红院av一区二区三区| 欧美大片顶级少妇| 色一情一伦一子一伦一区| 精油按摩中文字幕久久| 一区二区免费视频| 国产日韩欧美麻豆| 亚洲成人免费看| 国产精品动漫网站| 欧美成人欧美edvon| 在线看国产日韩| 国产1区2区3区精品美女| 天堂va蜜桃一区二区三区 | 国产高清久久久久| 亚洲国产成人av| 中文字幕中文在线不卡住| 日韩手机在线导航| 在线亚洲精品福利网址导航| 国产盗摄女厕一区二区三区| 五月婷婷激情综合| 综合久久久久久久| 久久久亚洲精品一区二区三区 | 日韩欧美综合在线| 欧美亚洲高清一区| 国产精品蜜臀在线观看| 日韩精品一区二区在线| 欧美伊人久久久久久久久影院| 不卡的电视剧免费网站有什么| 激情综合五月天| 日本在线不卡一区| 天堂午夜影视日韩欧美一区二区| 亚洲男人都懂的| 国产精品成人免费在线| 日本一区二区视频在线观看| 欧美不卡激情三级在线观看| 欧美一级国产精品| 欧美日韩精品欧美日韩精品一 | 欧美三区免费完整视频在线观看| 成人av综合在线| 成人激情av网| 国产91精品露脸国语对白| 国产精品一区不卡| 国产麻豆日韩欧美久久| 国产精品自拍三区| 欧美草草影院在线视频| 日韩一区二区三区在线视频|