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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? interrupt.c

?? lm3s6916上keil編譯的"hello world"程序
?? C
?? 第 1 頁 / 共 2 頁
字號:
//*****************************************************************************
//
// interrupt.c - Driver for the NVIC Interrupt Controller.
//
// Copyright (c) 2005-2007 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.  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 1234-conf of the Stellaris Peripheral Driver Library.
//
//*****************************************************************************

//*****************************************************************************
//
//! \addtogroup interrupt_api
//! @{
//
//*****************************************************************************

#include <hw_ints.h>
#include <hw_nvic.h>
#include <hw_types.h>
#include "cpu.h"
#include "debug.h"
#include "interrupt.h"

//*****************************************************************************
//
// This is a mapping between priority grouping encodings and the number of
// preemption priority bits.
//
//*****************************************************************************
static const unsigned long g_pulPriority[] =
{
    NVIC_APINT_PRIGROUP_0_8, NVIC_APINT_PRIGROUP_1_7, NVIC_APINT_PRIGROUP_2_6,
    NVIC_APINT_PRIGROUP_3_5, NVIC_APINT_PRIGROUP_4_4, NVIC_APINT_PRIGROUP_5_3,
    NVIC_APINT_PRIGROUP_6_2, NVIC_APINT_PRIGROUP_7_1
};

//*****************************************************************************
//
// This is a mapping between interrupt number and the register that contains
// the priority encoding for that interrupt.
//
//*****************************************************************************
static const unsigned long g_pulRegs[15] =
{
    0, NVIC_SYS_PRI1, NVIC_SYS_PRI2, NVIC_SYS_PRI3, NVIC_PRI0, NVIC_PRI1,
    NVIC_PRI2, NVIC_PRI3, NVIC_PRI4, NVIC_PRI5, NVIC_PRI6, NVIC_PRI7,
    NVIC_PRI8, NVIC_PRI9, NVIC_PRI10
};

//*****************************************************************************
//
//! \internal
//! The default interrupt handler.
//!
//! This is the default interrupt handler for all interrupts.  It simply loops
//! forever so that the system state is preserved for observation by a
//! debugger.  Since interrupts should be disabled before unregistering the
//! corresponding handler, this should never be called.
//!
//! \return None.
//
//*****************************************************************************
static void
IntDefaultHandler(void)
{
    //
    // Go into an infinite loop.
    //
    while(1)
    {
    }
}

//*****************************************************************************
//
// The processor vector table.
//
// This contains a list of the handlers for the various interrupt sources in
// the system.  The layout of this list is defined by the hardware; assertion
// of an interrupt causes the processor to start executing directly at the
// address given in the corresponding location in this list.
//
//*****************************************************************************
#ifdef ewarm
static __no_init void (*g_pfnRAMVectors[NUM_INTERRUPTS])(void) @ "VTABLE";
#else
static __attribute__((section("vtable")))
void (*g_pfnRAMVectors[NUM_INTERRUPTS])(void);
#endif

//*****************************************************************************
//
//! Enables the processor interrupt.
//!
//! Allows the processor to respond to interrupts.  This does not affect the
//! set of interrupts enabled in the interrupt controller; it just gates the
//! single interrupt from the controller to the processor.
//!
//! \return None.
//
//*****************************************************************************
void
IntMasterEnable(void)
{
    //
    // Enable processor interrupts.
    //
//    CPUcpsie();
}

//*****************************************************************************
//
//! Disables the processor interrupt.
//!
//! Prevents the processor from receiving interrupts.  This does not affect the
//! set of interrupts enabled in the interrupt controller; it just gates the
//! single interrupt from the controller to the processor.
//!
//! \return None.
//
//*****************************************************************************
void
IntMasterDisable(void)
{
    //
    // Disable processor interrupts.
    //
//    CPUcpsid();
}

//*****************************************************************************
//
//! Registers a function to be called when an interrupt occurs.
//!
//! \param ulInterrupt specifies the interrupt in question.
//! \param pfnHandler is a pointer to the function to be called.
//!
//! This function is used to specify the handler function to be called when the
//! given interrupt is asserted to the processor.  When the interrupt occurs,
//! if it is enabled (via IntEnable()), the handler function will be called in
//! interrupt context.  Since the handler function can preempt other code, care
//! must be taken to protect memory or peripherals that are accessed by the
//! handler and other non-handler code.
//!
//! \note The use of this function (directly or indirectly via a peripheral
//! driver interrupt register function) moves the interrupt vector table from
//! flash to SRAM.  Therefore, care must be taken when linking the application
//! to ensure that the SRAM vector table is located at the beginning of SRAM;
//! otherwise NVIC will not look in the correct portion of memory for the
//! vector table (it requires the vector table be on a 1 kB memory alignment).
//! Normally, the SRAM vector table is so placed via the use of linker scripts;
//! some tool chains, such as the evaluation version of RV-MDK, do not support
//! linker scripts and therefore will not produce a valid executable.  See the
//! discussion of compile-time versus run-time interrupt handler registration
//! in the introduction to this chapter.
//!
//! \return None.
//
//*****************************************************************************
void
IntRegister(unsigned long ulInterrupt, void (*pfnHandler)(void))
{
    unsigned long ulIdx;

    //
    // Check the arguments.
    //
    ASSERT(ulInterrupt < NUM_INTERRUPTS);

    //
    // Make sure that the RAM vector table is correctly aligned.
    //
    ASSERT(((unsigned long)g_pfnRAMVectors & 0x000003ff) == 0);

    //
    // See if the RAM vector table has been initialized.
    //
    if(HWREG(NVIC_VTABLE) != (unsigned long)g_pfnRAMVectors)
    {
        //
        // Copy the vector table from the beginning of FLASH to the RAM vector
        // table.
        //
        for(ulIdx = 0; ulIdx < NUM_INTERRUPTS; ulIdx++)
        {
            g_pfnRAMVectors[ulIdx] = (void (*)(void))HWREG(ulIdx * 4);
        }

        //
        // Point NVIC at the RAM vector table.
        //
        HWREG(NVIC_VTABLE) = (unsigned long)g_pfnRAMVectors;
    }

    //
    // Save the interrupt handler.
    //
    g_pfnRAMVectors[ulInterrupt] = pfnHandler;
}

//*****************************************************************************
//
//! Unregisters the function to be called when an interrupt occurs.
//!
//! \param ulInterrupt specifies the interrupt in question.
//!
//! This function is used to indicate that no handler should be called when the
//! given interrupt is asserted to the processor.  The interrupt source will be
//! automatically disabled (via IntDisable()) if necessary.
//!
//! \sa IntRegister() for important information about registering interrupt
//! handlers.
//!
//! \return None.
//
//*****************************************************************************
void
IntUnregister(unsigned long ulInterrupt)
{
    //
    // Check the arguments.
    //
    ASSERT(ulInterrupt < NUM_INTERRUPTS);

    //
    // Reset the interrupt handler.
    //
    g_pfnRAMVectors[ulInterrupt] = IntDefaultHandler;
}

//*****************************************************************************
//
//! Sets the priority grouping of the interrupt controller.
//!
//! \param ulBits specifies the number of bits of preemptable priority.
//!
//! This function specifies the split between preemptable priority levels and
//! subpriority levels in the interrupt priority specification.  The range of
//! the grouping values are dependent upon the hardware implementation; on
//! the Stellaris family it can range from 0 to 3.
//!
//! \return None.
//
//*****************************************************************************
void
IntPriorityGroupingSet(unsigned long ulBits)
{

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品乱码久久久久| 国产精品免费aⅴ片在线观看| 在线免费观看日本欧美| 欧洲国产伦久久久久久久| 日本一二三不卡| 一区二区三区国产精华| 蜜桃av一区二区| 国产精品69毛片高清亚洲| 91福利在线播放| 久久久久国产精品免费免费搜索| 国产精品久久国产精麻豆99网站 | 蜜桃视频在线一区| 91精品久久久久久久久99蜜臂| 国产亚洲自拍一区| 日本欧美久久久久免费播放网| 成人国产精品免费观看动漫| 欧美久久一区二区| 亚洲欧美日韩在线不卡| 精品一区二区综合| 欧美色视频在线| 亚洲三级在线观看| 国产精品影视在线| 国产精品理伦片| 欧洲日韩一区二区三区| 日韩精品欧美成人高清一区二区| 99精品视频在线观看| 国产嫩草影院久久久久| 九九视频精品免费| 国产精品久久久久影院亚瑟| 色悠悠亚洲一区二区| 国产精品久久久久影院亚瑟| 欧美三级蜜桃2在线观看| 久久 天天综合| 国产精品国产自产拍高清av | 美女久久久精品| 国产香蕉久久精品综合网| 99国产精品国产精品久久| 亚洲一区二区三区四区在线免费观看| 成人福利视频在线| 午夜精品久久久久久久99水蜜桃| 91免费版pro下载短视频| 国产日韩欧美精品一区| 欧美性大战久久久久久久蜜臀| 一区二区三区日本| 精品国产乱码久久久久久夜甘婷婷| 日本亚洲三级在线| 国产精品色哟哟| 日韩一区二区三区观看| 日韩精品欧美精品| 成人欧美一区二区三区黑人麻豆 | 奇米精品一区二区三区在线观看一| 欧美猛男男办公室激情| 免费观看在线色综合| 亚洲欧洲综合另类在线| 亚洲精品一线二线三线| 欧美在线观看视频一区二区 | 国产精品亚洲第一| 亚洲色图色小说| 久久久精品天堂| 欧美视频三区在线播放| 国产成人午夜精品5599 | 欧美亚洲禁片免费| 国产不卡视频在线播放| 国产精品美女久久久久av爽李琼| 欧美一区二区三区思思人| 国产麻豆精品95视频| 亚洲欧美在线另类| 久久精品网站免费观看| 91精品国产综合久久久久久久| 色成人在线视频| 成人app软件下载大全免费| 国产一区二区在线观看免费 | 色网综合在线观看| 国产69精品一区二区亚洲孕妇 | 欧美日韩免费观看一区二区三区| 粉嫩一区二区三区性色av| 黄色日韩网站视频| 亚洲欧美日本在线| 国产精品久久网站| 国产精品久久久久久久久果冻传媒| 久久综合精品国产一区二区三区| 成人av在线看| 国产成人一区二区精品非洲| 久久成人精品无人区| 亚洲免费观看高清完整版在线观看熊| 久久久久久久精| 久久蜜桃av一区精品变态类天堂 | 国产日韩亚洲欧美综合| 久久久国产精品不卡| 久久综合国产精品| 欧美精品一区二区久久婷婷| 精品精品欲导航| 91在线观看视频| 99国产精品久久久| 在线免费不卡视频| 欧美丝袜第三区| 欧美精品色一区二区三区| 欧美日韩高清一区二区| 欧美年轻男男videosbes| 欧美一区午夜视频在线观看| 91精品国产福利在线观看| 欧美mv日韩mv国产| 久久精品无码一区二区三区| 国产精品麻豆网站| 一区二区三区美女| 蜜桃视频第一区免费观看| 国产美女娇喘av呻吟久久| 懂色av一区二区三区蜜臀| 色综合久久久久久久久| 欧美日韩欧美一区二区| 精品三级在线观看| 国产精品视频九色porn| 亚洲主播在线观看| 激情综合网av| 成人免费看的视频| 国产乱码精品一区二区三区五月婷| 国产高清精品在线| 色中色一区二区| 日韩欧美国产三级电影视频| 欧美日韩日本视频| 精品国产乱码久久久久久免费| 国产精品人成在线观看免费| 夜夜爽夜夜爽精品视频| 精品亚洲免费视频| 97成人超碰视| 日韩色视频在线观看| 国产精品福利在线播放| 视频一区欧美精品| 成人精品gif动图一区| 欧美日韩一区二区三区免费看| 精品国产一区二区三区四区四 | 欧美日韩精品欧美日韩精品 | 国产喷白浆一区二区三区| 亚洲美女电影在线| 韩国三级在线一区| 在线观看国产精品网站| 久久免费视频一区| 亚洲国产毛片aaaaa无费看| 1024成人网| 久久成人羞羞网站| 日本精品一区二区三区四区的功能| 日韩精品一区国产麻豆| 亚洲精选一二三| 成人丝袜视频网| 日韩亚洲欧美在线观看| 亚洲一区二区三区国产| 成人av电影免费在线播放| 日韩免费观看高清完整版| 亚洲综合一区二区| 福利91精品一区二区三区| 日韩欧美一级片| 亚洲一区二区精品视频| av中文字幕一区| 91福利社在线观看| 亚洲欧洲日韩在线| 国产成人免费网站| 精品区一区二区| 日韩成人精品在线观看| 欧美日韩在线不卡| 一区二区三区高清| 99国产精品久久久久久久久久| 亚洲国产成人一区二区三区| 久久www免费人成看片高清| 欧美伦理电影网| 亚洲国产精品一区二区久久| 成人app网站| 国产精品视频你懂的| 成人黄色小视频| 国产精品视频一二三| 不卡的av在线| 中文字幕+乱码+中文字幕一区| 国产美女在线观看一区| 欧美精品一区二区久久婷婷| 精品一区二区三区香蕉蜜桃| 欧美成人aa大片| 久热成人在线视频| 亚洲综合色区另类av| 欧美综合久久久| 亚洲一区二区三区小说| 欧美日韩精品一区视频| 天堂在线亚洲视频| 日韩欧美一区二区免费| 精品中文字幕一区二区| 久久网站热最新地址| 福利一区福利二区| 亚洲色图.com| 欧美日韩视频第一区| 日韩黄色免费网站| 精品少妇一区二区三区 | 国产精品久久久久久久蜜臀| 不卡视频一二三四| 一区二区在线电影| 欧美剧在线免费观看网站| 久久精品久久99精品久久| 欧美v日韩v国产v| 国产成人8x视频一区二区| 亚洲丝袜美腿综合| 欧美久久久久久蜜桃| 久久er精品视频| 国产精品电影一区二区|