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

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

?? set_pinout.c

?? 基于TI公司Cortex-M3的uart超級通信開發
?? C
?? 第 1 頁 / 共 4 頁
字號:
    //
    return(true);
}

//*****************************************************************************
//
// Determines which daughter board is currently attached to the lm3s9b96
// development board and returns the daughter board's information block as
//
// This function determines which of the possible daughter boards are
// attached to the lm3s9b96.  It recognizes Flash/SRAM and FPGA daughter
// boards, each of which contains an I2C device which may be queried to
// identify the board.  In cases where the SDRAM daughter board is attached,
// this function will return \b NONE and the determination of whether or not
// the board is present is left to function SDRAMInit() in extram.c.
//
// \return Returns \b DAUGHTER_FPGA if the FPGA daugher is detected, \b
// DAUGHTER_SRAM_FLASH if the SRAM and flash board is detected and \b
// DAUGHTER_NONE if not board could be identified (covering the cases where
// either no board or the SDRAM board is attached).
//
//*****************************************************************************
static tDaughterBoard
DaughterBoardTypeGet(tDaughterIDInfo *psInfo)
{
    tBoolean bRetcode;

    //
    // Enable the I2C controller used to interface to the daughter board ID
    // EEPROM (if present).
    //
    SysCtlPeripheralEnable(ID_I2C_PERIPH);

    //
    // Configure the I2C SCL and SDA pins for I2C operation.
    //
    GPIOPinTypeI2C(ID_I2CSCL_GPIO_PORT, ID_I2CSCL_PIN | ID_I2CSDA_PIN);

    //
    // Initialize the I2C master.
    //
    I2CMasterInitExpClk(ID_I2C_MASTER_BASE, SysCtlClockGet(), 0);

    //
    // Read the ID information from the I2C EEPROM.
    //
    bRetcode = EEPROMReadPolled((unsigned char *)psInfo, 0,
                                sizeof(tDaughterIDInfo));

    //
    // Did we read the ID information successfully?
    //
    if(bRetcode)
    {
        //
        // Yes.  Check that the structure marker is what we expect.
        //
        if((psInfo->pucMarker[0] == 'I') && (psInfo->pucMarker[1] == 'D'))
        {
            //
            // Marker is fine.
            //
            switch(psInfo->usBoardID)
            {
                //
                // Is this a daughter board we know about already?
                //
                case DAUGHTER_SRAM_FLASH:
                {
                    //
                    // Yes - return the board ID.
                    //
                    return((tDaughterBoard)psInfo->usBoardID);
                }

                //
                // This is a daughter board that we don't know about.
                //
                default:
                {
                    return(DAUGHTER_UNKNOWN);
                }
            }
        }
    }

    //
    // We experienced an error reading the ID EEPROM or read no valid info
    // structure from the device.  This likely indicates that no daughter
    // board is present.  Set the return structure to configure the system
    // assuming that the default (SDRAM) daughter board is present.
    //
    psInfo->usBoardID = (unsigned short)DAUGHTER_NONE;
    psInfo->ulEPIPins = EPI_PINS_SDRAM;
    psInfo->ucEPIMode = EPI_MODE_SDRAM;
    psInfo->ulConfigFlags = (EPI_SDRAM_FULL_POWER | EPI_SDRAM_SIZE_64MBIT);
    psInfo->ucAddrMap = (EPI_ADDR_RAM_SIZE_256MB | EPI_ADDR_RAM_BASE_6);
    psInfo->usRate0nS = 20;
    psInfo->usRate1nS = 20;
    psInfo->ucRefreshInterval = 64;
    psInfo->usNumRows = 4096;
    return(DAUGHTER_NONE);
}


//*****************************************************************************
//
// Given the system clock rate and a desired EPI rate, calculate the divider
// necessary to set the EPI clock at or lower than but as close as possible to
// the desired rate.  The divider is returned and the desired rate is updated
// to give the actual EPI clock rate (in nanoseconds) that will result from
// the use of the calculated divider.
//
//*****************************************************************************
static unsigned short
EPIDividerFromRate(unsigned short *pusDesiredRate, unsigned long ulClknS)
{
    unsigned long ulDivider, ulDesired;

    //
    // If asked for an EPI clock that is at or above the system clock rate,
    // set the divider to 0 and update the EPI rate to match the system clock
    // rate.
    //
    if((unsigned long)*pusDesiredRate <= ulClknS)
    {
        *pusDesiredRate = (unsigned short)ulClknS;
        return(0);
    }

    //
    // The desired EPI rate is slower than the system clock so determine
    // the divider value to use to achieve this as best we can.  The divider
    // generates the EPI clock using the following formula:
    //
    //                     System Clock
    // EPI Clock =   -----------------------
    //                ((Divider/2) + 1) * 2
    //
    // The formula for ulDivider below is determined by reforming this
    // equation and including a (ulClknS - 1) term to ensure that we round
    // the correct way, generating an EPI clock that is never faster than
    // the requested rate.
    //
    ulDesired = (unsigned long)*pusDesiredRate;
    ulDivider = 2 * ((((ulDesired + (ulClknS - 1)) / ulClknS) / 2) - 1) + 1;

    //
    // Now calculate the actual EPI clock period based on the divider we
    // just chose.
    //
    *pusDesiredRate = (unsigned short)(ulClknS * (2 * ((ulDivider / 2) + 1)));

    //
    // Return the divider we calculated.
    //
    return((unsigned short)ulDivider);
}

//*****************************************************************************
//
// Calculate the divider parameter required by EPIDividerSet() based on the
// current system clock rate and the desired EPI rates supplied in the
// usRate0nS and usRate1nS fields of the daughter board information structure.
//
// The dividers are calculated to ensure that the EPI rate is no faster than
// the requested rate and the rate fields in psInfo are updated to reflect the
// actual rate that will be used based on the calculated divider.
//
//*****************************************************************************
static unsigned long
CalcEPIDivider(tDaughterIDInfo *psInfo, unsigned long ulClknS)
{
    unsigned short usDivider0, usDivider1;
    unsigned short usRate0, usRate1;

    //
    // Calculate the dividers required for the two rates specified.
    //
    usRate0 = psInfo->usRate0nS;
    usRate1 = psInfo->usRate1nS;
    usDivider0 = EPIDividerFromRate(&usRate0, ulClknS);
    usDivider1 = EPIDividerFromRate(&usRate1, ulClknS);
    psInfo->usRate0nS = usRate0;
    psInfo->usRate1nS = usRate1;

    //
    // Munge the two dividers together into a format suitable to pass to
    // EPIDividerSet().
    //
    return((unsigned long)usDivider0 | (((unsigned long)usDivider1) << 16));
}

//*****************************************************************************
//
// Returns the configuration parameter for EPIConfigHB8Set() based on the
// config flags and read and write access times found in the psInfo structure,
// and the current EPI clock clock rate as found in the usRate0nS field of the
// psInfo structure.
//
// The EPI clock rate is used to determine the number of wait states required
// so CalcEPIDivider() must have been called before this function to ensure
// that the usRate0nS field has been updated to reflect the actual EPI clock in
// use.  Note, also, that there is only a single read and write wait state
// setting even if dual chip selects are in use.  In this case, the caller
// must ensure that the dividers and access times provided generate suitable
// cycles for the devices attached to both chip selects.
//
//*****************************************************************************
static unsigned long
HB8ConfigGet(tDaughterIDInfo *psInfo)
{
    unsigned long ulConfig, ulWrWait, ulRdWait;

    //
    // Start with the config flags provided in the information structure.
    //
    ulConfig = psInfo->ulConfigFlags;

    //
    // How many write wait states do we need?
    //
    if((unsigned long)psInfo->ucWriteAccTime >
       (EPI_WRITE_CYCLES * (unsigned long)psInfo->usRate0nS))
    {
        //
        // The access time is more than 4 EPI clock cycles so we need to
        // introduce some wait states.  How many?
        //
        ulWrWait = (unsigned long)psInfo->ucWriteAccTime -
                   (EPI_WRITE_CYCLES * psInfo->usRate0nS);
        ulWrWait += ((EPI_WS_CYCLES * psInfo->usRate0nS) - 1);
        ulWrWait /= (EPI_WS_CYCLES * psInfo->usRate0nS);

        //
        // The hardware only allows us to specify 0, 1, 2 or 3 wait states.  If
        // we end up with a number greater than 3, we have a problem.  This
        // indicates an error in the daughter board information structure.
        //
        ASSERT(ulWrWait < 4);

        //
        // Set the configuration flag indicating the desired number of write
        // wait states.
        //
        switch(ulWrWait)
        {
            case 0:
                break;

            case 1:
                ulConfig |= EPI_HB8_WRWAIT_1;
                break;

            case 2:
                ulConfig |= EPI_HB8_WRWAIT_2;
                break;

            case 3:
            default:
                ulConfig |= EPI_HB8_WRWAIT_3;
                break;
        }
    }

    //
    // How many read wait states do we need?
    //
    if((unsigned long)psInfo->ucReadAccTime >
       (EPI_READ_CYCLES * (unsigned long)psInfo->usRate0nS))
    {
        //
        // The access time is more than 3 EPI clock cycles so we need to
        // introduce some wait states.  How many?
        //
        ulRdWait = (unsigned long)psInfo->ucReadAccTime -
                   (EPI_READ_CYCLES * psInfo->usRate0nS);
        ulRdWait += ((EPI_WS_CYCLES * psInfo->usRate0nS) - 1);
        ulRdWait /= (EPI_WS_CYCLES * psInfo->usRate0nS);

        //
        // The hardware only allows us to specify 0, 1, 2 or 3 wait states.  If
        // we end up with a number greater than 3, we have a problem.  This
        // indicates an error in the daughter board information structure.
        //
        ASSERT(ulRdWait < 4);

        //
        // Set the configuration flag indicating the desired number of read
        // wait states.
        //
        switch(ulRdWait)
        {
            case 0:
                break;

            case 1:
                ulConfig |= EPI_HB8_RDWAIT_1;
                break;

            case 2:
                ulConfig |= EPI_HB8_RDWAIT_2;
                break;

            case 3:
            default:
                ulConfig |= EPI_HB8_RDWAIT_3;
                break;
        }
    }

    //
    // Return the configuration flags back to the caller.
    //
    return(ulConfig);
}

//*****************************************************************************
//
// Returns the configuration parameters for EPIConfigSDRAMSet() based on the
// config flags, device size and refresh interval provided in psInfo and the
// system clock rate provided in ulClkHz.
//
//*****************************************************************************
static unsigned long
SDRAMConfigGet(tDaughterIDInfo *psInfo, unsigned long ulClkHz,
               unsigned long *pulRefresh)
{

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美美女一区二区三区| 韩国精品一区二区| 国产精品三级电影| 久久久久久久久久久黄色| 欧美变态tickling挠脚心| 91精品一区二区三区在线观看| 日本道在线观看一区二区| 91欧美一区二区| 91麻豆国产福利精品| 色综合久久综合网97色综合 | 亚洲线精品一区二区三区| 亚洲激情av在线| 自拍偷拍亚洲激情| 亚洲欧美日韩国产另类专区| 亚洲精品乱码久久久久久日本蜜臀| 亚洲精品ww久久久久久p站| 亚洲一区电影777| 美女视频黄久久| 国产真实精品久久二三区| caoporen国产精品视频| 欧美亚洲禁片免费| 精品国产伦一区二区三区观看体验| 久久久久久免费网| 亚洲人快播电影网| 日韩国产欧美一区二区三区| 国产精品小仙女| 色综合欧美在线| 欧美va亚洲va| 一区二区三区中文字幕精品精品 | 日本韩国一区二区三区| 欧美高清视频不卡网| xfplay精品久久| 亚洲女与黑人做爰| 人人爽香蕉精品| 99久久久精品免费观看国产蜜| 欧美亚男人的天堂| 精品国产伦理网| 亚洲综合色婷婷| 国产乱淫av一区二区三区| 色婷婷av一区二区| 久久丝袜美腿综合| 亚洲午夜在线电影| 不卡的av在线| 欧美精品一区二区不卡| 亚洲黄色av一区| 国产精品一区不卡| 制服.丝袜.亚洲.另类.中文| 国产精品三级久久久久三级| 久久99久久99| 欧美日韩性生活| 国产精品久久久久久久久免费樱桃| 日本亚洲免费观看| 91福利区一区二区三区| 国产精品看片你懂得| 国产综合久久久久影院| 欧美久久免费观看| 亚洲欧美偷拍另类a∨色屁股| 国内精品久久久久影院色| 欧美日韩色一区| 一区二区三区在线免费| 成人一区二区视频| 久久精品欧美日韩精品| 精品一区二区免费| 91精品欧美一区二区三区综合在| 一区二区三区在线播| 不卡高清视频专区| 综合久久国产九一剧情麻豆| 国产精品小仙女| 久久久精品国产99久久精品芒果 | 欧美主播一区二区三区| 亚洲欧美在线视频观看| 99久久99久久精品免费看蜜桃| 久久久蜜臀国产一区二区| 久久精品噜噜噜成人av农村| 日韩一本二本av| 日本不卡1234视频| 欧美日韩午夜精品| 五月综合激情婷婷六月色窝| 欧美色综合网站| 亚洲h精品动漫在线观看| 欧美一区二区三区婷婷月色| 天天影视网天天综合色在线播放| 欧美午夜精品一区二区三区| 午夜av一区二区| 日韩欧美国产一区二区三区| 久久国产免费看| 国产亚洲一区二区三区四区| 成人免费毛片嘿嘿连载视频| 国产精品久久久久久久第一福利| www.亚洲在线| 夜夜精品视频一区二区 | 粉嫩绯色av一区二区在线观看| 久久精品人人做人人爽97| 国产激情一区二区三区| 综合久久国产九一剧情麻豆| 91国偷自产一区二区三区成为亚洲经典 | 国产成人综合在线| 中文字幕在线观看不卡视频| 色就色 综合激情| 亚洲va国产天堂va久久en| 欧美成人在线直播| 91小视频在线观看| 日韩精品一二三四| 欧美国产欧美综合| 欧美色图在线观看| 国产一区二区伦理片| 亚洲男同1069视频| 日韩女优视频免费观看| 99久久99久久精品免费观看| 日韩二区在线观看| 中文字幕在线视频一区| 日韩视频一区二区三区| 99久久婷婷国产| 免费看黄色91| 亚洲欧美日韩一区二区三区在线观看| 在线播放91灌醉迷j高跟美女 | 一色桃子久久精品亚洲| 欧美乱熟臀69xxxxxx| 国产精品一区二区三区乱码| 亚洲一区在线观看网站| 国产拍欧美日韩视频二区| 欧美在线色视频| 大胆欧美人体老妇| 另类综合日韩欧美亚洲| 一区二区三区在线视频免费观看| 亚洲精品一区二区三区在线观看| 欧洲视频一区二区| 成人免费毛片aaaaa**| 日本午夜一区二区| 亚洲一区二三区| 国产精品久久久久一区二区三区共 | 在线国产电影不卡| 成人黄色电影在线| 国模少妇一区二区三区| 蜜臀久久99精品久久久久久9| 亚洲欧美日韩人成在线播放| 国产日韩精品一区| 日韩欧美一区二区免费| 欧美日本国产一区| 日本久久精品电影| 色综合久久久久综合99| 国产99精品国产| 成人蜜臀av电影| 成人动漫一区二区| 国产电影精品久久禁18| 国产成人免费视频网站高清观看视频| 免费欧美在线视频| 毛片av一区二区三区| 奇米色777欧美一区二区| 日韩和欧美一区二区| 亚洲国产aⅴ天堂久久| 亚洲chinese男男1069| 亚洲成人三级小说| 亚洲国产日韩一级| 日韩精品免费视频人成| 日本系列欧美系列| 美脚の诱脚舐め脚责91 | 天天综合色天天| 日韩精品欧美精品| 青青草国产精品亚洲专区无| 蜜桃视频一区二区三区| 国产一区二区三区免费| 成人午夜激情片| 97国产一区二区| 欧美喷水一区二区| 精品久久久久香蕉网| 国产三级精品三级在线专区| 亚洲欧美在线视频观看| 亚洲一二三四在线观看| 奇米一区二区三区| 国产成人综合网站| 欧美在线视频你懂得| 日韩欧美在线1卡| 日本一区二区久久| 亚洲在线中文字幕| 精品亚洲成av人在线观看| 国产成人免费在线观看不卡| 91小视频在线免费看| 日韩一级片网址| 国产精品免费人成网站| 亚洲综合男人的天堂| 久久草av在线| 一本高清dvd不卡在线观看| 日韩精品一区二区在线| 国产精品美女久久久久久久久| 亚洲另类在线一区| 麻豆国产欧美一区二区三区| bt7086福利一区国产| 日韩视频免费观看高清完整版在线观看 | 色欧美88888久久久久久影院| 欧美日韩大陆一区二区| 国产欧美一区二区精品仙草咪| 一区二区免费在线| 国产一区在线不卡| 欧美日韩一区高清| 亚洲欧美一区二区三区极速播放| 久久狠狠亚洲综合| 欧美区在线观看| 亚洲免费观看高清在线观看| 国产夫妻精品视频|