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

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

?? gpio_jtag.c

?? 周立功ARM Stellaris驅動庫源程序
?? C
字號:
//*****************************************************************************
//
// gpio_jtag.c - Example to demonstrate recovering the JTAG interface.
//
// Copyright (c) 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 920 of the Stellaris Driver Library.
//
//*****************************************************************************

#include "../../hw_ints.h"
#include "../../hw_memmap.h"
#include "../../hw_types.h"
#include "../../src/debug.h"
#include "../../src/gpio.h"
#include "../../src/interrupt.h"
#include "../../src/sysctl.h"
#include "../pdc.h"

//*****************************************************************************
//
//! \addtogroup dk_lm3sxxx_list
//! <h1>GPIO JTAG Recovery (gpio_jtag)</h1>
//!
//! This example demonstrates changing the JTAG pins into GPIOs, along with a
//! mechanism to revert them to JTAG pins.  When first run, the pins remain in
//! JTAG mode.  Pressing the user push button will toggle the pins between JTAG
//! mode and GPIO mode.  Because there is no debouncing of the push button
//! (either in hardware or software), a button press will occasionally result
//! in more than one mode change.
//!
//! In this example, all five pins (PB7, PC0, PC1, PC2, and PC3) are switched,
//! though the more typical use would be to change PB7 into a GPIO.  Note that
//! because of errata in Rev Bx and Rev C0 Stellaris microcontrollers, JTAG and
//! SWD will not function if PB7 is configured as a GPIO.  This errata will be
//! fixed in the next revision, available by Q2'07.
//
//*****************************************************************************

//*****************************************************************************
//
// The current mode of pins PB7, PC0, PC1, PC2, and PC3.  When zero, the pins
// are in JTAG mode; when non-zero, the pins are in GPIO mode.
//
//*****************************************************************************
volatile unsigned long g_ulMode;

//*****************************************************************************
//
// The error routine that is called if the driver library encounters an error.
//
//*****************************************************************************
#ifdef DEBUG
void
__error__(char *pcFilename, unsigned long ulLine)
{
}
#endif

//*****************************************************************************
//
// The interrupt handler for the PB4 pin interrupt.  When triggered, this will
// toggle the JTAG pins from between JTAG and GPIO mode.
//
//*****************************************************************************
void
GPIOBIntHandler(void)
{
    //
    // Clear the GPIO interrupt.
    //
    GPIOPinIntClear(GPIO_PORTB_BASE, GPIO_PIN_4);

    //
    // Toggle the pin mode.
    //
    g_ulMode ^= 1;

    //
    // See if the pins should be in JTAG or GPIO mode.
    //
    if(g_ulMode == 0)
    {
        //
        // Change PB7 and PC0-3 into hardware (i.e. JTAG) pins.
        //
        GPIODirModeSet(GPIO_PORTB_BASE, GPIO_PIN_7, GPIO_DIR_MODE_HW);
        GPIODirModeSet(GPIO_PORTC_BASE,
                       GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3,
                       GPIO_DIR_MODE_HW);
    }
    else
    {
        //
        // Change PB7 and PC0-3 into GPIO inputs.
        //
        GPIODirModeSet(GPIO_PORTB_BASE, GPIO_PIN_7, GPIO_DIR_MODE_IN);
        GPIODirModeSet(GPIO_PORTC_BASE,
                       GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3,
                       GPIO_DIR_MODE_IN);
    }
}

//*****************************************************************************
//
// Toggle the JTAG pins between JTAG and GPIO mode with a push button selecting
// between the two.
//
//*****************************************************************************
int
main(void)
{
    unsigned long ulMode;

    //
    // Set the clocking to run directly from the crystal.
    //
    SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN |
                   SYSCTL_XTAL_6MHZ);

    //
    // Enable the peripherals used by this application.
    //
    SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);
    SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOC);

    //
    // Configure the push button as an input and enable the pin to interrupt on
    // the falling edge (i.e. when the push button is pressed).
    //
    GPIODirModeSet(GPIO_PORTB_BASE, GPIO_PIN_4, GPIO_DIR_MODE_IN);
    GPIOIntTypeSet(GPIO_PORTB_BASE, GPIO_PIN_4, GPIO_FALLING_EDGE);
    GPIOPinIntEnable(GPIO_PORTB_BASE, GPIO_PIN_4);
    IntEnable(INT_GPIOB);

    //
    // Set the global and local indicator of pin mode to zero, meaning JTAG.
    //
    g_ulMode = 0;
    ulMode = 0;

    //
    // Init the PDC and then the LCD.
    //
    PDCInit();
    PDCLCDInit();
    PDCLCDBacklightOn();
    PDCLCDSetPos(1, 0);
    PDCLCDWrite("PB7/PC0-3 are", 13);
    PDCLCDSetPos(5, 1);
    PDCLCDWrite("JTAG", 4);

    //
    // Loop forever.  This loop simply exists to display on the LCD the current
    // state of PB7/PC0-3; the handling of changing the JTAG pins to and from
    // GPIO mode is done in GPIOBIntHandler().
    //
    while(1)
    {
        //
        // Wait until the pin mode changes.
        //
        while(g_ulMode == ulMode)
        {
        }

        //
        // Save the new mode locally so that a subsequent pin mode change can
        // be detected.
        //
        ulMode = g_ulMode;

        //
        // See what the new pin mode was changed to.
        //
        if(ulMode == 0)
        {
            //
            // Indicate that PB7 and PC0-3 are currently JTAG pins.
            //
            PDCLCDSetPos(5, 1);
            PDCLCDWrite("JTAG", 4);
        }
        else
        {
            //
            // Indicate that PB7 and PC0-3 are currently GPIO pins.
            //
            PDCLCDSetPos(5, 1);
            PDCLCDWrite("GPIO", 4);
        }
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久婷婷成人综合色| 亚洲免费色视频| 国产精品青草久久| 日韩中文字幕区一区有砖一区| 韩国欧美国产1区| 在线成人免费观看| 国产精品国产三级国产aⅴ原创 | 亚洲在线视频一区| 国产一区二区三区免费播放 | 亚洲成a人v欧美综合天堂下载 | 亚洲综合久久av| 成人不卡免费av| 国产情人综合久久777777| 午夜电影一区二区三区| 色久优优欧美色久优优| 国产精品天美传媒| 国产盗摄视频一区二区三区| 91精品国产高清一区二区三区 | 国产成人日日夜夜| 久久久久99精品国产片| 乱一区二区av| 欧美va亚洲va在线观看蝴蝶网| 亚洲精品国产高清久久伦理二区| 成人免费三级在线| 国产日韩欧美a| 成人小视频在线| 久久久91精品国产一区二区精品| 久久99久久久久久久久久久| 欧美三级在线看| 亚洲国产你懂的| 欧美视频中文一区二区三区在线观看 | 国产精品国产三级国产专播品爱网| 黄一区二区三区| 久久精品综合网| 国产成人小视频| 亚洲欧洲日产国产综合网| www.日本不卡| 亚洲自拍欧美精品| 欧美日韩精品一区二区天天拍小说 | 在线观看av一区| 亚洲福利一二三区| 欧美一级理论性理论a| 免费观看在线综合色| 26uuu亚洲综合色| 成人一级黄色片| 亚洲欧洲制服丝袜| 在线综合视频播放| 久久国产精品72免费观看| 久久久久久久久久久久久久久99 | 国产99久久精品| 一色桃子久久精品亚洲| 欧洲另类一二三四区| 日本在线播放一区二区三区| 精品国产伦一区二区三区免费| 国产精品亚洲成人| 亚洲永久免费av| 精品国产一二三区| av一二三不卡影片| 午夜免费欧美电影| 亚洲国产成人私人影院tom| 色婷婷亚洲婷婷| 麻豆久久一区二区| 国产精品久久影院| 欧美精品18+| 国产成人综合自拍| 亚洲亚洲人成综合网络| 久久久www成人免费无遮挡大片| 丁香网亚洲国际| 午夜影院久久久| 国产亚洲欧美一级| 欧美精品日日鲁夜夜添| 国产成人精品一区二区三区网站观看| 亚洲日本电影在线| 2020国产精品自拍| 在线看不卡av| 国产91丝袜在线播放九色| 亚洲小说欧美激情另类| 欧美极品xxx| 欧美一级在线免费| 91视频.com| 国产99精品视频| 久久不见久久见中文字幕免费| 自拍偷拍欧美激情| 久久久影院官网| 337p亚洲精品色噜噜狠狠| 91亚洲男人天堂| 国产精品一级在线| 美女性感视频久久| 亚洲一区在线看| 亚洲欧美日韩在线播放| 久久久久国产精品麻豆ai换脸 | 国产一区二区0| 日韩精品一级二级| 亚洲gay无套男同| 亚洲蜜臀av乱码久久精品蜜桃| 国产欧美一区二区三区在线看蜜臀| 91精品国产乱| 91精品久久久久久蜜臀| 日本韩国视频一区二区| www.亚洲免费av| 波多野结衣亚洲| 不卡av免费在线观看| 黄网站免费久久| 久久电影网站中文字幕| 日本美女一区二区三区| 日韩中文字幕区一区有砖一区| 亚洲影视资源网| 亚洲一卡二卡三卡四卡无卡久久| 亚洲欧洲精品天堂一级| 中文字幕日韩精品一区 | 麻豆一区二区三| 日本视频一区二区| 奇米精品一区二区三区在线观看一| 亚洲午夜免费视频| 亚洲高清视频在线| 天堂一区二区在线| 日本视频一区二区三区| 免费人成精品欧美精品| 蜜臂av日日欢夜夜爽一区| 免费在线观看视频一区| 久久99日本精品| 国产成人综合精品三级| 粗大黑人巨茎大战欧美成人| 成人av在线看| 色综合久久88色综合天天免费| 色8久久人人97超碰香蕉987| 99久久精品国产观看| 日本乱人伦aⅴ精品| 欧美日韩精品福利| 日韩欧美高清一区| 久久精品人人做人人爽97| 国产精品色哟哟网站| 亚洲免费视频成人| 免费精品99久久国产综合精品| 一区二区三区四区在线免费观看| 性做久久久久久| 国产精品人成在线观看免费| 国产欧美日韩视频在线观看| 99久久精品免费精品国产| 蜜桃视频在线一区| 中文字幕中文在线不卡住| 中文字幕一区二区三中文字幕| 蓝色福利精品导航| 欧美日韩黄色一区二区| 中文字幕一区二区三区不卡在线| 九九九久久久精品| 91精品久久久久久久99蜜桃| 亚洲激情综合网| 国产成人自拍高清视频在线免费播放 | 中文幕一区二区三区久久蜜桃| 日韩制服丝袜av| 欧美日韩视频专区在线播放| 最新热久久免费视频| 国产高清亚洲一区| 久久这里只有精品首页| 久久国产精品露脸对白| 69堂精品视频| 午夜a成v人精品| 欧美视频三区在线播放| 亚洲嫩草精品久久| 97se亚洲国产综合自在线不卡| 欧美激情资源网| 国产传媒一区在线| 国产精品网站在线观看| 不卡一区中文字幕| 成人欧美一区二区三区白人| 高清不卡在线观看| 国产精品入口麻豆原神| 成人免费视频一区| 中文字幕视频一区二区三区久| 成人av在线资源网| 亚洲欧洲一区二区三区| 91亚洲精品一区二区乱码| 一区二区三区自拍| 欧美中文字幕一区二区三区| 亚洲图片欧美一区| 91精品免费在线| 精品一区二区成人精品| 国产亚洲一本大道中文在线| 国产成人精品一区二区三区四区| 国产欧美日韩视频一区二区| 国产精品996| 中文字幕日本不卡| 欧美视频一区二区三区| 麻豆精品在线看| 欧美国产欧美亚州国产日韩mv天天看完整| 国产伦精品一区二区三区免费迷 | 麻豆一区二区三| 久久久久国产一区二区三区四区| 成人性生交大片免费| 一区二区在线免费观看| 欧美一区二区三区不卡| 国内久久精品视频| 国产精品国产馆在线真实露脸| 91福利小视频| 另类专区欧美蜜桃臀第一页| 国产精品黄色在线观看| 欧美日本在线一区| 国产成人免费视| 婷婷丁香久久五月婷婷|