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

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

?? hibernate.c

?? KEIL驅動 各方面各 你的看法女士的煩惱 方看到你
?? C
?? 第 1 頁 / 共 3 頁
字號:
//*****************************************************************************
//
// hibernate.c - Driver for the Hibernation module
//
// Copyright (c) 2007-2008 Luminary Micro, Inc.  All rights reserved.
// 
// Software License Agreement
// 
// Luminary Micro, Inc. (LMI) is supplying this software for use solely and
// exclusively on LMI's microcontroller products.
// 
// The software is owned by LMI and/or its suppliers, and is protected under
// applicable copyright laws.  All rights are reserved.  You may not combine
// this software with "viral" open-source software in order to form a larger
// program.  Any use in violation of the foregoing restrictions may subject
// the user to criminal sanctions under applicable laws, as well as to civil
// liability for the breach of the terms and conditions of this license.
// 
// THIS SOFTWARE IS PROVIDED "AS IS".  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.
// LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
// CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
// 
// This is part of revision 3223 of the Stellaris Peripheral Driver Library.
//
//*****************************************************************************

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

#include "../hw_hibernate.h"
#include "../hw_ints.h"
#include "../hw_memmap.h"
#include "../hw_sysctl.h"
#include "../hw_types.h"
#include "debug.h"
#include "hibernate.h"
#include "interrupt.h"
#include "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));
}

//*****************************************************************************

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一区在线免费观看| 日韩精品福利网| 91蝌蚪国产九色| 亚洲国产精品传媒在线观看| 不卡欧美aaaaa| 亚洲视频一二三区| 91精品国产综合久久精品| 国产成人精品aa毛片| 国产欧美一区在线| 欧美日韩国产影片| 成人性视频免费网站| 日本不卡中文字幕| 尤物在线观看一区| 精品久久久久久久久久久久久久久| 国产iv一区二区三区| 日韩精品免费视频人成| 国产精品久久久久一区二区三区| 在线精品视频免费播放| av电影在线观看一区| 国产揄拍国内精品对白| 日韩精品视频网| 亚洲欧美日韩一区| 中文一区二区在线观看| 91精品国产综合久久蜜臀| 色婷婷国产精品久久包臀| 成人毛片视频在线观看| 国产成人一区在线| 国产精品亚洲一区二区三区在线| 青草国产精品久久久久久| 最好看的中文字幕久久| 欧美国产精品一区二区三区| 精品国产1区二区| 久久久久久亚洲综合| 欧美一区二区福利视频| 欧美一二三四在线| 2020国产精品久久精品美国| 久久视频一区二区| 国产精品夫妻自拍| 亚洲一级不卡视频| 国产精品1区2区3区在线观看| 国内精品伊人久久久久av影院 | 免费在线观看精品| 日本视频在线一区| 国产91高潮流白浆在线麻豆| av一二三不卡影片| 欧美色国产精品| 国产色产综合色产在线视频| 综合亚洲深深色噜噜狠狠网站| 亚洲高清在线精品| 成人美女视频在线观看| 欧美色图第一页| 亚洲国产精品成人综合色在线婷婷| 1000精品久久久久久久久| 午夜精品福利在线| 99久久免费国产| 久久综合狠狠综合久久综合88| 国产精品素人一区二区| 日韩制服丝袜av| 欧美亚洲日本一区| 亚洲va韩国va欧美va| 六月丁香婷婷色狠狠久久| 91毛片在线观看| 中文天堂在线一区| 国产麻豆精品一区二区| 日韩一区二区视频在线观看| 亚洲色图在线播放| 99在线热播精品免费| 国产亚洲精品7777| 欧美日韩dvd在线观看| 亚洲黄一区二区三区| 国产91对白在线观看九色| 日本一区二区三区电影| 99热这里都是精品| 亚洲人被黑人高潮完整版| 91.com视频| 精品在线亚洲视频| 精品国产91洋老外米糕| 激情久久五月天| 久久伊人蜜桃av一区二区| 国产在线麻豆精品观看| 久久精品欧美一区二区三区麻豆| 蜜臀a∨国产成人精品| 91精品国产综合久久精品麻豆| 久久99久久精品| 国产欧美日韩久久| 6080yy午夜一二三区久久| 国产传媒日韩欧美成人| 亚洲精品国产无套在线观| 日韩午夜在线影院| 色哟哟精品一区| 成人精品电影在线观看| 中文字幕亚洲电影| 日韩亚洲欧美在线观看| 欧美精品日韩精品| 一本高清dvd不卡在线观看 | 日本v片在线高清不卡在线观看| 国产精品国产三级国产普通话三级| 日本一区二区三区国色天香 | 国产精品久久久久aaaa樱花| 91精品国产综合久久福利软件| 北岛玲一区二区三区四区| 天堂一区二区在线| 一区二区三区四区国产精品| 日本一二三不卡| 国产精品国产精品国产专区不片| 欧美电视剧在线看免费| 91在线观看免费视频| 国产成人午夜精品影院观看视频| 日本午夜一本久久久综合| 全部av―极品视觉盛宴亚洲| 日韩av一区二区在线影视| 亚洲色图欧洲色图| 一区精品在线播放| 国产精品久久久久影院亚瑟| 国产丝袜在线精品| 中文字幕一区二区不卡| 久久中文字幕电影| 日本一区二区不卡视频| 亚洲欧美在线aaa| 亚洲超碰精品一区二区| 激情综合色播五月| 欧美综合亚洲图片综合区| 日韩欧美国产综合| 亚洲电影第三页| 美女视频黄久久| 看国产成人h片视频| 黄色成人免费在线| 成人综合在线视频| 欧美二区三区的天堂| 精品欧美一区二区久久| 亚洲日本在线视频观看| 日日夜夜免费精品| 波多野结衣在线aⅴ中文字幕不卡 波多野结衣在线一区 | 一区二区三区在线观看动漫| 亚洲高清免费一级二级三级| 国产一区二三区好的| 日本电影亚洲天堂一区| 国产亚洲美州欧州综合国| 一区二区激情小说| 丰满少妇在线播放bd日韩电影| 一本到三区不卡视频| 精品国产成人系列| 蜜桃av一区二区| 欧洲精品在线观看| 尤物av一区二区| 色视频成人在线观看免| 久久精品人人做人人综合| 日本 国产 欧美色综合| 欧美色欧美亚洲另类二区| 亚洲人成影院在线观看| 国产a视频精品免费观看| 国产日韩三级在线| 国产成人av一区| 国产欧美一区视频| 国产高清不卡二三区| 欧美国产国产综合| 99久久国产免费看| 亚洲欧美另类在线| 色播五月激情综合网| 日韩av一二三| 9191精品国产综合久久久久久| 亚洲一区在线视频观看| 欧洲另类一二三四区| 免费在线观看精品| 国产精品久久影院| 欧美日韩在线一区二区| 奇米色一区二区三区四区| 久久理论电影网| 91蜜桃在线免费视频| 另类欧美日韩国产在线| 亚洲国产精品成人久久综合一区 | 蜜臀a∨国产成人精品| 精品国产第一区二区三区观看体验| 国产精品888| 亚洲一区在线播放| 国产亚洲污的网站| 欧美日韩亚洲高清一区二区| 国产一区视频网站| 日韩黄色免费电影| |精品福利一区二区三区| 91精品婷婷国产综合久久性色| 成人晚上爱看视频| 极品美女销魂一区二区三区 | 麻豆成人久久精品二区三区小说| 中文字幕精品一区二区精品绿巨人| 91精品国产一区二区三区香蕉| av影院午夜一区| 国产成人精品一区二区三区四区| 天天爽夜夜爽夜夜爽精品视频| 国产精品日韩成人| 国产精品美女久久久久久2018| 久久精品亚洲精品国产欧美kt∨| 欧美一区二区三区的| 欧美日韩日日夜夜| 色爱区综合激月婷婷| 91视频一区二区三区| 一本一道波多野结衣一区二区| 91视频免费观看| 色天使色偷偷av一区二区| 欧美视频一区二区三区|