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

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

?? sysctl.c

?? 飛利浦LM3S系列ARM的庫文件,在進行arm開發時所必須的庫文件,直接加到工程中,一般不必修改.
?? C
?? 第 1 頁 / 共 5 頁
字號:
//*****************************************************************************
//
// sysctl.c - Driver for the system controller.
//
// Copyright (c) 2005,2006 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 Stellaris Family of microcontroller products.
//
// The software is owned by LMI and/or its suppliers, and is protected under
// applicable copyright laws.  All rights are reserved.  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 687 of the Stellaris Driver Library.
//
//*****************************************************************************

//*****************************************************************************
//
//! \addtogroup sysctl_api
//! @{
//
//*****************************************************************************

#include "hw_ints.h"
#include "hw_memmap.h"
#include "hw_nvic.h"
#include "hw_sysctl.h"
#include "hw_types.h"
#include "cpu.h"
#include "debug.h"
#include "interrupt.h"
#include "sysctl.h"

//*****************************************************************************
//
// An array that maps the "peripheral set" number (which is stored in the upper
// nibble of the SYSCTL_PERIPH_* defines) to the SYSCTL DC? register that
// contains the peripheral present bit for that peripheral.
//
//*****************************************************************************
const unsigned long g_pulDCRegs[] =
{
    SYSCTL_DC1,
    SYSCTL_DC2,
    SYSCTL_DC4,
    SYSCTL_DC1
};

//*****************************************************************************
//
// An array that maps the "peripheral set" number (which is stored in the upper
// nibble of the SYSCTL_PERIPH_* defines) to the SYSCTL_SRCR? register that
// controls the software reset for that peripheral.
//
//*****************************************************************************
const unsigned long g_pulSRCRRegs[] =
{
    SYSCTL_SRCR0,
    SYSCTL_SRCR1,
    SYSCTL_SRCR2
};

//*****************************************************************************
//
// An array that maps the "peripheral set" number (which is stored in the upper
// nibble of the SYSCTL_PERIPH_* defines) to the SYSCTL_RCGC? register that
// controls the run-mode enable for that peripheral.
//
//*****************************************************************************
const unsigned long g_pulRCGCRegs[] =
{
    SYSCTL_RCGC0,
    SYSCTL_RCGC1,
    SYSCTL_RCGC2
};

//*****************************************************************************
//
// An array that maps the "peripheral set" number (which is stored in the upper
// nibble of the SYSCTL_PERIPH_* defines) to the SYSCTL_SCGC? register that
// controls the sleep-mode enable for that peripheral.
//
//*****************************************************************************
const unsigned long g_pulSCGCRegs[] =
{
    SYSCTL_SCGC0,
    SYSCTL_SCGC1,
    SYSCTL_SCGC2
};

//*****************************************************************************
//
// An array that maps the "peripheral set" number (which is stored in the upper
// nibble of the SYSCTL_PERIPH_* defines) to the SYSCTL_DCGC? register that
// controls the deep-sleep-mode enable for that peripheral.
//
//*****************************************************************************
const unsigned long g_pulDCGCRegs[] =
{
    SYSCTL_DCGC0,
    SYSCTL_DCGC1,
    SYSCTL_DCGC2
};

//*****************************************************************************
//
// An array that maps the crystal number in RCC to a frequency.
//
//*****************************************************************************
const unsigned long g_pulXtals[] =
{
    3579545,
    3686400,
    4000000,
    4096000,
    4915200,
    5000000,
    5120000,
    6000000,
    6144000,
    7372800,
    8000000,
    8192000
};

//*****************************************************************************
//
//! Gets the size of the SRAM.
//!
//! This function determines the size of the SRAM on the Stellaris device.
//!
//! \return The total number of bytes of SRAM.
//
//*****************************************************************************
unsigned long
SysCtlSRAMSizeGet(void)
{
    //
    // Compute the size of the SRAM.
    //
    return(((HWREG(SYSCTL_DC0) & SYSCTL_DC0_SRAMSZ_MASK) >> 8) + 0x100);
}

//*****************************************************************************
//
//! Gets the size of the flash.
//!
//! This function determines the size of the flash on the Stellaris device.
//!
//! \return The total number of bytes of flash.
//
//*****************************************************************************
unsigned long
SysCtlFlashSizeGet(void)
{
    //
    // Compute the size of the flash.
    //
    return(((HWREG(SYSCTL_DC0) & SYSCTL_DC0_FLASHSZ_MASK) << 11) + 0x800);
}

//*****************************************************************************
//
//! Determines if a pin is present.
//!
//! \param ulPin is the pin in question.
//!
//! Determines if a particular pin is present in the device.  The PWM, analog
//! comparators, ADC, and timers have a varying number of pins across members
//! of the Stellaris family; this will determine which are present on this
//! device.
//!
//! The \b ulPin argument must be only one of the following values:
//! \b SYSCTL_PIN_PWM0, \b SYSCTL_PIN_PWM1, \b SYSCTL_PIN_PWM2,
//! \b SYSCTL_PIN_PWM3, \b SYSCTL_PIN_PWM4, \b SYSCTL_PIN_PWM5,
//! \b SYSCTL_PIN_C0MINUS, \b SYSCTL_PIN_C0PLUS, \b SYSCTL_PIN_C0O,
//! \b SYSCTL_PIN_C1MINUS, \b SYSCTL_PIN_C1PLUS, \b SYSCTL_PIN_C1O,
//! \b SYSCTL_PIN_C2MINUS, \b SYSCTL_PIN_C2PLUS, \b SYSCTL_PIN_C2O,
//! \b SYSCTL_PIN_ADC0, \b SYSCTL_PIN_ADC1, \b SYSCTL_PIN_ADC2,
//! \b SYSCTL_PIN_ADC3, \b SYSCTL_PIN_ADC4, \b SYSCTL_PIN_ADC5,
//! \b SYSCTL_PIN_ADC6, \b SYSCTL_PIN_ADC7, \b SYSCTL_PIN_CCP0,
//! \b SYSCTL_PIN_CCP1, \b SYSCTL_PIN_CCP2, \b SYSCTL_PIN_CCP3,
//! \b SYSCTL_PIN_CCP4, \b SYSCTL_PIN_CCP5, \b SYSCTL_PIN_CCP6,
//! \b SYSCTL_PIN_CCP7, or \b SYSCTL_PIN_32KHZ.
//!
//! \return Returns \b true if the specified pin is present and \b false if it
//! is not.
//
//*****************************************************************************
tBoolean
SysCtlPinPresent(unsigned long ulPin)
{
    //
    // Check the arguments.
    //
    ASSERT((ulPin == SYSCTL_PIN_PWM0) ||
           (ulPin == SYSCTL_PIN_PWM1) ||
           (ulPin == SYSCTL_PIN_PWM2) ||
           (ulPin == SYSCTL_PIN_PWM3) ||
           (ulPin == SYSCTL_PIN_PWM4) ||
           (ulPin == SYSCTL_PIN_PWM5) ||
           (ulPin == SYSCTL_PIN_C0MINUS) ||
           (ulPin == SYSCTL_PIN_C0PLUS) ||
           (ulPin == SYSCTL_PIN_C0O) ||
           (ulPin == SYSCTL_PIN_C1MINUS) ||
           (ulPin == SYSCTL_PIN_C1PLUS) ||
           (ulPin == SYSCTL_PIN_C1O) ||
           (ulPin == SYSCTL_PIN_C2MINUS) ||
           (ulPin == SYSCTL_PIN_C2PLUS) ||
           (ulPin == SYSCTL_PIN_C2O) ||
           (ulPin == SYSCTL_PIN_ADC0) ||
           (ulPin == SYSCTL_PIN_ADC1) ||
           (ulPin == SYSCTL_PIN_ADC2) ||
           (ulPin == SYSCTL_PIN_ADC3) ||
           (ulPin == SYSCTL_PIN_ADC4) ||
           (ulPin == SYSCTL_PIN_ADC5) ||
           (ulPin == SYSCTL_PIN_ADC6) ||
           (ulPin == SYSCTL_PIN_ADC7) ||
           (ulPin == SYSCTL_PIN_CCP0) ||
           (ulPin == SYSCTL_PIN_CCP1) ||
           (ulPin == SYSCTL_PIN_CCP2) ||
           (ulPin == SYSCTL_PIN_CCP3) ||
           (ulPin == SYSCTL_PIN_CCP4) ||
           (ulPin == SYSCTL_PIN_CCP5) ||
           (ulPin == SYSCTL_PIN_32KHZ))

    //
    // Determine if this pin is present.
    //
    if(HWREG(SYSCTL_DC3) & ulPin)
    {
        return(true);
    }
    else
    {
        return(false);
    }
}

//*****************************************************************************
//
//! Determines if a peripheral is present.
//!
//! \param ulPeripheral is the peripheral in question.
//!
//! Determines if a particular peripheral is present in the device.  Each
//! member of the Stellaris family has a different peripheral set; this will
//! determine which are present on this device.
//!
//! The \b ulPeripheral argument must be only one of the following values:
//! \b SYSCTL_PERIPH_PWM, \b SYSCTL_PERIPH_ADC, \b SYSCTL_PERIPH_WDOG,
//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_SSI,
//! \b SYSCTL_PERIPH_QEI, \b SYSCTL_PERIPH_I2C, \b SYSCTL_PERIPH_TIMER0,
//! \b SYSCTL_PERIPH_TIMER1, \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_COMP0,
//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_GPIOA,
//! \b SYSCTL_PERIPH_GPIOB, \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD,
//! \b SYSCTL_PERIPH_GPIOE, \b SYSCTL_PERIPH_MPU, \b SYSCTL_PERIPH_TEMP, or
//! \b SYSCTL_PERIPH_PLL.
//!
//! \return Returns \b true if the specified peripheral is present and \b false
//! if it is not.
//
//*****************************************************************************
tBoolean
SysCtlPeripheralPresent(unsigned long ulPeripheral)
{
    //
    // Check the arguments.
    //
    ASSERT((ulPeripheral == SYSCTL_PERIPH_PWM) ||
           (ulPeripheral == SYSCTL_PERIPH_ADC) ||
           (ulPeripheral == SYSCTL_PERIPH_WDOG) ||
           (ulPeripheral == SYSCTL_PERIPH_UART0) ||
           (ulPeripheral == SYSCTL_PERIPH_UART1) ||
           (ulPeripheral == SYSCTL_PERIPH_SSI) ||
           (ulPeripheral == SYSCTL_PERIPH_QEI) ||
           (ulPeripheral == SYSCTL_PERIPH_I2C) ||
           (ulPeripheral == SYSCTL_PERIPH_TIMER0) ||
           (ulPeripheral == SYSCTL_PERIPH_TIMER1) ||
           (ulPeripheral == SYSCTL_PERIPH_TIMER2) ||
           (ulPeripheral == SYSCTL_PERIPH_COMP0) ||
           (ulPeripheral == SYSCTL_PERIPH_COMP1) ||
           (ulPeripheral == SYSCTL_PERIPH_COMP2) ||
           (ulPeripheral == SYSCTL_PERIPH_GPIOA) ||
           (ulPeripheral == SYSCTL_PERIPH_GPIOB) ||
           (ulPeripheral == SYSCTL_PERIPH_GPIOC) ||
           (ulPeripheral == SYSCTL_PERIPH_GPIOD) ||
           (ulPeripheral == SYSCTL_PERIPH_GPIOE) ||
           (ulPeripheral == SYSCTL_PERIPH_MPU) ||
           (ulPeripheral == SYSCTL_PERIPH_TEMP) ||
           (ulPeripheral == SYSCTL_PERIPH_PLL));

    //
    // Read the correct DC register and determine if this peripheral exists.
    //
    if(HWREG(g_pulDCRegs[ulPeripheral >> 28]) & ulPeripheral & 0x0fffffff)
    {
        return(true);
    }
    else
    {
        return(false);
    }
}

//*****************************************************************************
//
//! Performs a software reset of a peripheral.
//!
//! \param ulPeripheral is the peripheral to reset.
//!
//! This function performs a software reset of the specified peripheral.  An
//! individual peripheral reset signal is asserted for a brief period and then
//! deasserted, leaving the peripheral in a operating state but in its reset
//! condition.
//!
//! The \b ulPeripheral argument must be only one of the following values:
//! \b SYSCTL_PERIPH_PWM, \b SYSCTL_PERIPH_ADC, \b SYSCTL_PERIPH_WDOG,
//! \b SYSCTL_PERIPH_UART0, \b SYSCTL_PERIPH_UART1, \b SYSCTL_PERIPH_SSI,
//! \b SYSCTL_PERIPH_QEI, \b SYSCTL_PERIPH_I2C, \b SYSCTL_PERIPH_TIMER0,
//! \b SYSCTL_PERIPH_TIMER1, \b SYSCTL_PERIPH_TIMER2, \b SYSCTL_PERIPH_COMP0,
//! \b SYSCTL_PERIPH_COMP1, \b SYSCTL_PERIPH_COMP2, \b SYSCTL_PERIPH_GPIOA,
//! \b SYSCTL_PERIPH_GPIOB, \b SYSCTL_PERIPH_GPIOC, \b SYSCTL_PERIPH_GPIOD, or
//! \b SYSCTL_PERIPH_GPIOE.
//!
//! \return None.
//
//*****************************************************************************
void
SysCtlPeripheralReset(unsigned long ulPeripheral)
{
    volatile unsigned long ulDelay;

    //
    // Check the arguments.
    //
    ASSERT((ulPeripheral == SYSCTL_PERIPH_PWM) ||
           (ulPeripheral == SYSCTL_PERIPH_ADC) ||
           (ulPeripheral == SYSCTL_PERIPH_WDOG) ||
           (ulPeripheral == SYSCTL_PERIPH_UART0) ||
           (ulPeripheral == SYSCTL_PERIPH_UART1) ||
           (ulPeripheral == SYSCTL_PERIPH_SSI) ||
           (ulPeripheral == SYSCTL_PERIPH_QEI) ||
           (ulPeripheral == SYSCTL_PERIPH_I2C) ||
           (ulPeripheral == SYSCTL_PERIPH_TIMER0) ||
           (ulPeripheral == SYSCTL_PERIPH_TIMER1) ||
           (ulPeripheral == SYSCTL_PERIPH_TIMER2) ||
           (ulPeripheral == SYSCTL_PERIPH_COMP0) ||
           (ulPeripheral == SYSCTL_PERIPH_COMP1) ||

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人免费高清视频| 精品人伦一区二区色婷婷| 精品一区二区三区视频| 午夜影院在线观看欧美| 亚洲狠狠丁香婷婷综合久久久| 国产精品国产精品国产专区不蜜| 欧美精品一区二区三区在线播放| 精品粉嫩超白一线天av| 亚洲蜜臀av乱码久久精品| 一区二区三区在线视频播放| 亚洲精品国久久99热| 国内外成人在线| 成人av网站在线观看| 成人美女视频在线看| 91精品国产乱| 欧美成人艳星乳罩| 亚洲综合视频在线| 麻豆成人在线观看| 懂色av中文一区二区三区| 99久久婷婷国产综合精品电影| 一本到一区二区三区| 欧美精品丝袜中出| 精品91自产拍在线观看一区| 天使萌一区二区三区免费观看| 蜜桃传媒麻豆第一区在线观看| 色吧成人激情小说| 日韩一区二区三区四区五区六区| 国产日韩三级在线| 亚洲国产精品自拍| 国v精品久久久网| 精品久久久久一区二区国产| 日本视频一区二区| fc2成人免费人成在线观看播放| 色一区在线观看| 一区二区中文字幕在线| 免费美女久久99| av电影天堂一区二区在线观看| 久久精品一二三| 日韩成人av影视| 欧美嫩在线观看| 亚洲图片欧美激情| 国产福利一区二区| 日韩久久免费av| 亚洲午夜免费视频| 欧美精品乱码久久久久久按摩| 亚洲国产日韩综合久久精品| 欧美亚一区二区| 国产精品成人一区二区艾草 | 亚洲视频一二三| 91浏览器在线视频| 久久精品一区蜜桃臀影院| 国产xxx精品视频大全| 《视频一区视频二区| 色av一区二区| 蜜臀久久99精品久久久画质超高清| 日韩欧美卡一卡二| 成人国产精品视频| 亚洲综合偷拍欧美一区色| 91精品国产欧美一区二区18| 国产在线看一区| 最好看的中文字幕久久| 3d成人动漫网站| 亚洲综合图片区| 午夜影视日本亚洲欧洲精品| 日韩一区二区视频| 成人综合婷婷国产精品久久免费| 亚洲另类一区二区| 日韩一区二区三区视频| 成人综合激情网| 午夜精品一区二区三区三上悠亚| 色婷婷精品久久二区二区蜜臂av | 国产精品不卡一区| 精品视频资源站| 亚洲丶国产丶欧美一区二区三区| 欧美xxxxxxxx| 色8久久精品久久久久久蜜| 久久精品免费看| 欧美v日韩v国产v| 91麻豆国产香蕉久久精品| 美国精品在线观看| 亚洲视频一二三区| 2021中文字幕一区亚洲| 韩国一区二区视频| 亚洲一区二区三区在线看| 国产亚洲综合性久久久影院| 欧美日本在线看| caoporen国产精品视频| 久久国产夜色精品鲁鲁99| 一区二区三区在线免费播放| 久久久蜜桃精品| av不卡在线观看| 国产在线视频一区二区三区| 亚洲gay无套男同| 亚洲女与黑人做爰| 国产亚洲精品bt天堂精选| 在线观看91av| 欧美在线观看视频一区二区| 午夜精品久久久久久久久久| 国产精品高潮久久久久无| 亚洲精品在线网站| 91精品国产色综合久久不卡电影| 日本道精品一区二区三区| 国产99久久久久| 国产精品一区二区在线观看不卡| 中文字幕一区二区三区色视频| 日韩欧美成人激情| 538prom精品视频线放| 精品视频123区在线观看| 色网站国产精品| 一本色道久久加勒比精品 | 日本vs亚洲vs韩国一区三区二区| 亚洲精品日日夜夜| 亚洲乱码国产乱码精品精小说 | 欧美一级生活片| 欧美日韩一区不卡| 欧美中文一区二区三区| 欧美色男人天堂| 欧美三电影在线| 欧美夫妻性生活| 91麻豆精品国产综合久久久久久| 欧美图片一区二区三区| 欧美亚洲国产一区二区三区va| 一本到三区不卡视频| 一本一本久久a久久精品综合麻豆| av电影在线观看完整版一区二区| 成人免费视频视频在线观看免费| 成人高清在线视频| 91在线云播放| 欧美日韩亚洲另类| 欧美一区二区三区在线视频| 日韩欧美精品在线| 久久欧美一区二区| 日韩一区在线播放| 亚洲一区二区三区在线| 日韩精品1区2区3区| 久久福利资源站| 成人在线视频一区二区| 色哟哟一区二区| 91精品国产aⅴ一区二区| 欧美精品一区视频| 国产精品二三区| 亚洲.国产.中文慕字在线| 久久草av在线| 成人免费av资源| 欧美三级中文字幕| 精品国产3级a| 一区二区视频在线看| 日本系列欧美系列| 成人精品免费看| 欧美日韩国产首页| 久久久久久久久久久久电影 | 一区二区三区四区精品在线视频| 亚洲午夜久久久久久久久久久 | 亚洲自拍偷拍九九九| 日本麻豆一区二区三区视频| 国产激情一区二区三区四区| 91女厕偷拍女厕偷拍高清| 日韩视频免费观看高清完整版在线观看 | 波波电影院一区二区三区| 在线免费观看成人短视频| 日韩女优毛片在线| 日韩美女视频一区| 精品一区二区三区在线播放| 97成人超碰视| 久久综合九色综合97婷婷女人 | 中文字幕+乱码+中文字幕一区| 久久先锋资源网| 亚洲国产日韩综合久久精品| 国产在线国偷精品免费看| 国产1区2区3区精品美女| 欧美日本在线看| 亚洲欧美视频一区| 国产一区二区三区国产| 欧美日韩一区二区在线视频| 国产精品乱码人人做人人爱| 亚洲欧美另类久久久精品2019| 久久99精品久久久| 欧美日韩亚洲丝袜制服| 亚洲色图欧美激情| 国内久久婷婷综合| 日韩色视频在线观看| 亚洲国产精品影院| 91色综合久久久久婷婷| 国产亚洲自拍一区| 久久99国产精品免费网站| 在线播放中文一区| 亚洲黄色尤物视频| 色视频欧美一区二区三区| 中文字幕不卡三区| 懂色av一区二区夜夜嗨| www国产精品av| 激情丁香综合五月| 日韩精品中文字幕一区二区三区 | 国产成人av一区二区三区在线| 91精品国产麻豆| 青青草国产成人99久久| 91.麻豆视频| 全国精品久久少妇| 日韩一级在线观看| 久久se这里有精品|