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

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

?? set_pinout.c

?? 基于TI公司Cortex-M3的uart超級通信開發
?? C
?? 第 1 頁 / 共 4 頁
字號:
    unsigned long ulConfig;

    //
    // Start with the config flags provided to us.
    //
    ulConfig = psInfo->ulConfigFlags;

    //
    // Set the SDRAM core frequency depending upon the system clock rate.
    //
    if(ulClkHz < 15000000)
    {
        ulConfig |= EPI_SDRAM_CORE_FREQ_0_15;
    }
    else if(ulClkHz < 30000000)
    {
        ulConfig |= EPI_SDRAM_CORE_FREQ_15_30;
    }
    else if(ulClkHz < 50000000)
    {
        ulConfig |= EPI_SDRAM_CORE_FREQ_30_50;
    }
    else
    {
        ulConfig |= EPI_SDRAM_CORE_FREQ_50_100;
    }

    //
    // Now determine the correct refresh count required to refresh the entire
    // device in the time specified.
    //
    *pulRefresh = ((ulClkHz / psInfo->usNumRows) *
                  (unsigned long)psInfo->ucRefreshInterval) / 1000;

    //
    // Return the calculated configuration parameter to the caller.
    //
    return(ulConfig);
}

//*****************************************************************************
//
// Configures all pins associated with the Extended Peripheral Interface (EPI).
//
// \param eDaughter identifies the attached daughter board (if any).
//
// This function configures all pins forming part of the EPI on the device and
// configures the EPI peripheral appropriately for whichever hardware we
// detect is connected to it. On exit, the EPI peripheral is enabled and all
// pins associated with the interface are configured as EPI signals. Drive
// strength is set to 8mA.
//
//*****************************************************************************
static void
EPIPinConfigSet(tDaughterIDInfo *psInfo)
{
    unsigned long ulLoop, ulClk, ulNsPerTick, ulRefresh;
    unsigned char pucPins[NUM_GPIO_PORTS];

    //
    // Enable the EPI peripheral
    //
    SysCtlPeripheralEnable(SYSCTL_PERIPH_EPI0);

    //
    // Clear our pin bit mask array.
    //
    for(ulLoop = 0; ulLoop < NUM_GPIO_PORTS; ulLoop++)
    {
        pucPins[ulLoop] = 0;
    }

    //
    // Determine the pin bit masks for the EPI pins for each GPIO port.
    //
    for(ulLoop = 0; ulLoop < NUM_EPI_SIGNALS; ulLoop++)
    {
        //
        // Is this EPI signal required?
        //
        if(psInfo->ulEPIPins & (1 << ulLoop))
        {
            //
            // Yes - set the appropriate bit in our pin bit mask array.
            //
            pucPins[g_psEPIPinInfo[ulLoop].ucPortIndex] |=
                (1 << g_psEPIPinInfo[ulLoop].ucPin);
        }
    }

    //
    // At this point, pucPins contains bit masks for each GPIO port with 1s in
    // the positions of every required EPI signal.  Now we need to configure
    // those pins appropriately.  Cycle through each port configuring EPI pins
    // in any port which contains them.
    //
    for(ulLoop = 0; ulLoop < NUM_GPIO_PORTS; ulLoop++)
    {
        //
        // Are there any EPI pins used in this port?
        //
        if(pucPins[ulLoop])
        {
            //
            // Yes - configure the EPI pins.
            //
            GPIOPadConfigSet(g_pulGPIOBase[ulLoop], pucPins[ulLoop],
                             GPIO_STRENGTH_8MA, GPIO_PIN_TYPE_STD_WPU);
            GPIODirModeSet(g_pulGPIOBase[ulLoop], pucPins[ulLoop],
                           GPIO_DIR_MODE_HW);
        }
    }

    //
    // Now set the EPI operating mode for the daughter board detected.  We need
    // to determine some timing information based on the ID block we have and
    // also the current system clock.
    //
    ulClk = SysCtlClockGet();
    ulNsPerTick = 1000000000/ulClk;

    //
    // If the EPI is not disabled (the daughter board may, for example, want
    // to use all the pins for GPIO), configure the interface as required.
    //
    if(psInfo->ucEPIMode != EPI_MODE_DISABLE)
    {
        //
        // Set the EPI clock divider to ensure a basic EPI clock rate no faster
        // than defined via the ucRate0nS and ucRate1nS fields in the info
        // structure.
        //
        EPIDividerSet(EPI0_BASE, CalcEPIDivider(psInfo, ulNsPerTick));

        //
        // Set the basic EPI operating mode based on the value from the info
        // structure.
        //
        EPIModeSet(EPI0_BASE, psInfo->ucEPIMode);

        //
        // Carry out mode-dependent configuration.
        //
        switch(psInfo->ucEPIMode)
        {
            //
            // The daughter board must be configured for SDRAM operation.
            //
            case EPI_MODE_SDRAM:
            {
                //
                // Work out the SDRAM configuration settings based on the
                // supplied ID structure and system clock rate.
                //
                ulLoop = SDRAMConfigGet(psInfo, ulClk, &ulRefresh);

                //
                // Set the SDRAM configuration.
                //
                EPIConfigSDRAMSet(EPI0_BASE, ulLoop, ulRefresh);
                break;
            }

            //
            // The daughter board must be configured for HostBus8 operation.
            //
            case EPI_MODE_HB8:
            {
                //
                // Determine the number of read and write wait states required
                // to meet the supplied access timing.
                //
                ulLoop = HB8ConfigGet(psInfo);

                //
                // Set the HostBus8 configuration.
                //
                EPIConfigHB8Set(EPI0_BASE, ulLoop, psInfo->ucMaxWait);
                break;
            }

            //
            // The daughter board must be configured for Non-Moded/General
            // Purpose operation.
            //
            case EPI_MODE_GENERAL:
            {
                EPIConfigGPModeSet(EPI0_BASE, psInfo->ulConfigFlags,
                                   psInfo->ucFrameCount, psInfo->ucMaxWait);
                break;
            }
        }

        //
        // Set the EPI address mapping.
        //
        EPIAddressMapSet(EPI0_BASE, psInfo->ucAddrMap);
    }
}

//*****************************************************************************
//
// Set the GPIO port control registers appropriately for the hardware.
//
// This function determines the correct port control settings to enable the
// basic peripheral signals for the dk-lm3s9b96 on their respective pins and
// also ensures that all required EPI signals are correctly routed.  The EPI
// signal configuration is determined from the daughter board information
// structure passed via the \e psInfo parameter.
//
//*****************************************************************************
static void
PortControlSet(tDaughterIDInfo *psInfo)
{
    unsigned long ulPctl[NUM_GPIO_PORTS], ulLoop;

    //
    // To begin with, we set the port control values for all the non-EPI
    // peripherals.
    //

    //
    // GPIO Port A pins
    //
    // To use CAN0, this register value must be changed. The value here
    // enables USB functionality instead of CAN. For CAN, use....
    //
    //  ulPctl[0] = GPIO_PCTL_PA0_U0RX | GPIO_PCTL_PA1_U0TX |
    //              GPIO_PCTL_PA2_SSI0CLK | GPIO_PCTL_PA3_SSI0FSS |
    //              GPIO_PCTL_PA4_SSI0RX | GPIO_PCTL_PA5_SSI0TX |
    //              GPIO_PCTL_PA6_CAN0RX | GPIO_PCTL_PA7_CAN0TX;
    //
    ulPctl[0] = GPIO_PCTL_PA0_U0RX | GPIO_PCTL_PA1_U0TX |
                GPIO_PCTL_PA2_SSI0CLK | GPIO_PCTL_PA3_SSI0FSS |
                GPIO_PCTL_PA4_SSI0RX | GPIO_PCTL_PA5_SSI0TX |
                GPIO_PCTL_PA6_USB0EPEN | GPIO_PCTL_PA7_USB0PFLT;

    //
    // GPIO Port B pins
    //
    ulPctl[1] = GPIO_PCTL_PB2_I2C0SCL | GPIO_PCTL_PB3_I2C0SDA |
                GPIO_PCTL_PB6_I2S0TXSCK | GPIO_PCTL_PB7_NMI;

    //
    // GPIO Port C pins
    //
    ulPctl[2] = GPIO_PCTL_PC0_TCK | GPIO_PCTL_PC1_TMS |
                GPIO_PCTL_PC2_TDI | GPIO_PCTL_PC3_TDO;

    //
    // GPIO Port D pins.
    //
    ulPctl[3] = GPIO_PCTL_PD0_I2S0RXSCK | GPIO_PCTL_PD1_I2S0RXWS |
                GPIO_PCTL_PD4_I2S0RXSD | GPIO_PCTL_PD5_I2S0RXMCLK;

    //
    // GPIO Port E pins
    //
    ulPctl[4] = GPIO_PCTL_PE4_I2S0TXWS | GPIO_PCTL_PE5_I2S0TXSD;

    //
    // GPIO Port F pins
    //
    ulPctl[5] = GPIO_PCTL_PF1_I2S0TXMCLK | GPIO_PCTL_PF2_LED1 |
                GPIO_PCTL_PF3_LED0;

    //
    // GPIO Port G pins
    //
    ulPctl[6] = 0;

    //
    // GPIO Port H pins
    //
    ulPctl[7] = 0;

    //
    // GPIO Port J pins
    //
    ulPctl[8] = 0;

    //
    // Now we OR in the values required for each of the EPI pins depending
    // upon whether or not it is needed.
    //
    for(ulLoop = 0; ulLoop < NUM_EPI_SIGNALS; ulLoop++)
    {
        //
        // Is this EPI pin used by this daughter board?
        //
        if(psInfo->ulEPIPins & (1 << ulLoop))
        {
            //
            // Yes - add the appropriate port control setting for it.
            //
            ulPctl[g_psEPIPinInfo[ulLoop].ucPortIndex] |=
                (g_psEPIPinInfo[ulLoop].ucPctl <<
                 (g_psEPIPinInfo[ulLoop].ucPin * 4));
        }
    }

    //
    // Now that we have determined the required configuration, set the actual
    // port control registers.
    //
    HWREG(GPIO_PORTA_BASE + GPIO_O_PCTL) = ulPctl[0];
    HWREG(GPIO_PORTB_BASE + GPIO_O_PCTL) = ulPctl[1];
    HWREG(GPIO_PORTC_BASE + GPIO_O_PCTL) = ulPctl[2];
    HWREG(GPIO_PORTD_BASE + GPIO_O_PCTL) = ulPctl[3];
    HWREG(GPIO_PORTE_BASE + GPIO_O_PCTL) = ulPctl[4];
    HWREG(GPIO_PORTF_BASE + GPIO_O_PCTL) = ulPctl[5];
    HWREG(GPIO_PORTG_BASE + GPIO_O_PCTL) = ulPctl[6];
    HWREG(GPIO_PORTH_BASE + GPIO_O_PCTL) = ulPctl[7];
    HWREG(GPIO_PORTJ_BASE + GPIO_O_PCTL) = ulPctl[8];
}

//*****************************************************************************
//
//! Configures the LM3S9B96 device pinout for the development board.
//!
//! This function configures each pin of the lm3s9b96 device to route the
//! appropriate peripheral signal as required by the design of the
//! dk-lm3s9b96 development board.
//!
//! \note This module can be built in two ways.  If the label SIMPLE_PINOUT_SET
//! is not defined, the PinoutSet() function will attempt to read an I2C EEPROM
//! to determine which daughter board is attached to the development kit board
//! and use information from that EEPROM to dynamically configure the EPI

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
婷婷综合另类小说色区| 1024亚洲合集| 欧美韩国日本一区| 偷窥少妇高潮呻吟av久久免费| 精品无人码麻豆乱码1区2区| 91同城在线观看| 精品国产91乱码一区二区三区| 亚洲精品乱码久久久久久黑人| 奇米在线7777在线精品| 粉嫩av亚洲一区二区图片| 欧美日韩的一区二区| 中文av一区二区| 激情成人午夜视频| 91精品国产入口在线| 一区二区三区免费在线观看| 成人激情免费电影网址| 久久亚洲综合色一区二区三区| 婷婷一区二区三区| 欧美探花视频资源| 一区二区三区在线观看网站| 99精品桃花视频在线观看| 国产午夜亚洲精品午夜鲁丝片| 精品一区二区三区免费视频| 欧美一卡2卡三卡4卡5免费| 亚洲成年人网站在线观看| 色偷偷成人一区二区三区91 | 国产一区二区网址| 欧美成人精品二区三区99精品| 日本一区二区免费在线观看视频| 亚洲精品欧美激情| 91网址在线看| 亚洲天堂免费在线观看视频| 99久免费精品视频在线观看| 国产精品久久久久久久久晋中| 国产乱子轮精品视频| 精品国产乱码久久久久久免费 | 欧美日韩成人综合天天影院| 亚洲一区二区三区四区五区黄 | 国产欧美久久久精品影院| 国产一区二区美女| 欧美激情综合五月色丁香小说| 国产成人免费视频网站 | 国产精品久久久久aaaa樱花 | 亚洲成精国产精品女| 欧美三级日本三级少妇99| 日日夜夜免费精品| 日韩精品一区二区三区在线播放| 另类调教123区| 国产日韩欧美精品在线| 91在线看国产| 亚洲成a人片在线观看中文| 777色狠狠一区二区三区| 韩国在线一区二区| 国产精品久久久久一区二区三区共 | 日韩av电影天堂| 欧美videos中文字幕| 成人免费毛片高清视频| 亚洲一区在线观看视频| 日韩精品一区二区三区视频| 国产 日韩 欧美大片| 亚洲精品美腿丝袜| 日韩欧美国产电影| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 7777精品久久久大香线蕉| 狠狠色丁香九九婷婷综合五月 | 欧美精品一区二区在线观看| www.欧美.com| 日韩制服丝袜av| 国产精品毛片高清在线完整版| 91国产成人在线| 狠狠色丁香婷婷综合| 亚洲精品亚洲人成人网在线播放| 欧美肥胖老妇做爰| 国产很黄免费观看久久| 亚洲国产aⅴ成人精品无吗| 久久久不卡影院| 国产精品一卡二卡| 亚洲成在人线在线播放| 久久精品欧美一区二区三区不卡| 91香蕉视频在线| 久久99国产精品成人| 亚洲免费av观看| 久久久久久久综合日本| 欧美精品777| 99国产精品99久久久久久| 国产一区二区三区av电影| 亚洲午夜国产一区99re久久| 中文字幕在线观看不卡| 精品欧美久久久| 欧美日韩久久久一区| 91浏览器在线视频| 国产a级毛片一区| 国内精品国产成人| 免费看精品久久片| 亚瑟在线精品视频| 亚洲最新视频在线播放| 亚洲人精品午夜| 国产精品久久久久四虎| 日本一区二区三级电影在线观看| 日韩免费观看2025年上映的电影| 欧美日韩综合一区| 欧美系列亚洲系列| 色吊一区二区三区| 色94色欧美sute亚洲13| 91视频观看视频| 成人99免费视频| 成人av网在线| 成人av网站在线观看| 成人一级片在线观看| 国产又黄又大久久| 国产成人免费av在线| 国产成人夜色高潮福利影视| 国产在线播放一区三区四| 国产毛片精品一区| 国产一区二区在线观看免费| 国产美女娇喘av呻吟久久| 国产呦萝稀缺另类资源| 国产福利视频一区二区三区| 成人免费看的视频| 99精品视频一区二区| 91麻豆精品一区二区三区| 色综合 综合色| 欧美日韩dvd在线观看| 91精品国产aⅴ一区二区| 日韩精品一区二区在线观看| 久久久精品免费观看| 欧美极品少妇xxxxⅹ高跟鞋| 亚洲桃色在线一区| 亚洲成人av电影在线| 狠狠色狠狠色综合| jvid福利写真一区二区三区| 97国产一区二区| 在线精品视频小说1| 91精品麻豆日日躁夜夜躁| 精品国产一区久久| 亚洲国产高清不卡| 亚洲国产一区视频| 久久成人免费网| zzijzzij亚洲日本少妇熟睡| 色婷婷激情综合| 欧美一级视频精品观看| 国产欧美一区二区精品久导航| 尤物在线观看一区| 久久国产精品无码网站| 不卡的av电影| 7777精品伊人久久久大香线蕉| 国产视频911| 亚洲va韩国va欧美va精品| 国产一区二区调教| 色老综合老女人久久久| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 久久久久久久性| 亚洲激情五月婷婷| 久久精品国产秦先生| 99免费精品视频| 日韩无一区二区| 中文字幕一区二区三区蜜月 | av色综合久久天堂av综合| 亚洲精品写真福利| 污片在线观看一区二区| 国产成人无遮挡在线视频| 欧美日韩一区二区三区在线看| 精品99999| 午夜精品久久久久久久99水蜜桃| 国产精品自拍毛片| 欧美日韩国产首页在线观看| 中文字幕乱码亚洲精品一区 | 成人教育av在线| 91精品国产91久久综合桃花 | 国产精品国产精品国产专区不蜜| 亚洲 欧美综合在线网络| 不卡的电影网站| 欧美精品一区二区三区视频 | 成人av电影在线网| 欧美变态tickle挠乳网站| 亚洲主播在线播放| 成人免费视频app| 久久久美女艺术照精彩视频福利播放| 亚洲国产一区二区视频| 色香蕉成人二区免费| 色婷婷激情综合| 日韩精品一区国产麻豆| 亚洲高清免费视频| 成人av中文字幕| 国产日韩精品久久久| 久久99国内精品| 717成人午夜免费福利电影| 夜夜嗨av一区二区三区网页| 成人一区二区三区视频| 国产清纯在线一区二区www| 美女在线视频一区| 欧美精品久久99久久在免费线 | 欧美高清在线一区| 国产一区二区三区免费观看| 精品国产三级a在线观看| 精品一区二区三区香蕉蜜桃| 精品三级av在线| 激情综合色综合久久| 日韩一区国产二区欧美三区| 日韩电影在线观看网站|