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

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

?? ezkitutilities.c

?? ADI公司blackfin DSP開發板BF533 EZ-KIT LITE附帶的全部原代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*********************************************************************************

Copyright(c) 2005 Analog Devices, Inc. All Rights Reserved.

This software is proprietary and confidential.  By using this software you agree
to the terms of the associated Analog Devices License Agreement.

$RCSfile: ezkitutilities.c,v $
$Revision: 1.4 $
$Date: 2007/06/21 14:02:48 $

Description:    EZ-Kit utility routines.  This file contains a collection
                of functions that automate typical EZ-Kit functionality,
                including control of LEDs and push buttons.

*********************************************************************************/


/*********************************************************************

Include files

*********************************************************************/

#include <services/services.h>      // system service includes
#include <sysreg.h>                 // system config definitions
#include "ezkitutilities.h"     // EZ-Kit utility definitions


/*********************************************************************

flash addresses for BF-533 EZ-Kit

*********************************************************************/

#if defined(__ADSP_EDINBURGH__)         // the Edinburgh EZ-Kit uses a flash for ports

#define pFlashA_PortA_In    ((volatile unsigned char *)0x20270000)  // address of flash A port A input data register
#define pFlashA_PortA_Out   ((volatile unsigned char *)0x20270004)  // address of flash A port A output data register
#define pFlashA_PortA_Dir   ((volatile unsigned char *)0x20270006)  // address of flash A port A direction register

#define pFlashA_PortB_In    ((volatile unsigned char *)0x20270001)  // address of flash A port B input data register
#define pFlashA_PortB_Out   ((volatile unsigned char *)0x20270005)  // address of flash A port B output data register
#define pFlashA_PortB_Dir   ((volatile unsigned char *)0x20270007)  // address of flash A port B direction register

#define pFlashB_PortA_In    ((volatile unsigned char *)0x202E0000)  // address of flash B port A input data register
#define pFlashB_PortA_Out   ((volatile unsigned char *)0x202E0004)  // address of flash B port A output data register
#define pFlashB_PortA_Dir   ((volatile unsigned char *)0x202E0006)  // address of flash B port A direction register

#define pFlashB_PortB_In    ((volatile unsigned char *)0x202E0001)  // address of flash B port B input data register
#define pFlashB_PortB_Out   ((volatile unsigned char *)0x202E0005)  // address of flash B port B output data register
#define pFlashB_PortB_Dir   ((volatile unsigned char *)0x202E0007)  // address of flash B port B direction register

#endif

//REMOVE WHEN DRIVERS ARE ADDED
/*********************************************************************

Miscellaneous defines

*********************************************************************/

#if defined(__ADSP_EDINBURGH__)         // ADSP-BF533 EZ-Kit specific info
#define RST_7183                (0x8)       //decoder reset bit #3 in flashA portA
#define PPICLK_ADV7183_SELECT   (0x10)      //decoder clock to PPI bit #4 in flashA portA
#define ADV7183_OE_MASK     (0x4)       //ADV7183 /OE = PF2
#define ADV7183_OE          (0)         //Index into Codec flag handler array
#define RST_7171                (0x4)       // encoder reset
#endif


#if defined(__ADSP_TETON__)
#define ADV7183_RESET       (13)        //decoder reset bit
#define ADV7183_OE      (2)     //ADV7183 /OE = PF2
#define ADV7183_Reset_Delay     0x04000000  // For delay after reset
#define ADV7183_Lock        0x0000ffff  // For startup locktime delay
#define ADV7179_RESET       (14)        // encoder reset bit
#endif



/*********************************************************************

LED/Button to pf mappings

*********************************************************************/
#if defined(__ADSP_EDINBURGH__) // ADSP-BF533 EZ-Kit mappings
ADI_FLAG_ID ezButtonToFlag[] = {
    ADI_FLAG_PF8,           // button 0
    ADI_FLAG_PF9,           // button 1
    ADI_FLAG_PF10,          // button 2
    ADI_FLAG_PF11           // button 3
};
ADI_FLAG_ID ezLEDToFlag[] = {  // (not used on Edinburgh but needed as placeholder)
    ADI_FLAG_PF0,           // led 0
    ADI_FLAG_PF0,           // led 1
    ADI_FLAG_PF0,           // led 2
    ADI_FLAG_PF0,           // led 3
    ADI_FLAG_PF0,           // led 4
    ADI_FLAG_PF0            // led 5
};
#endif

/*********************************************************************/

#if defined(__ADSP_STIRLING__) // ADSP-BF538 EZ-Kit mappings
ADI_FLAG_ID ezButtonToFlag[] = {
    ADI_FLAG_PF0,           // button 0
    ADI_FLAG_PF1,           // button 1
    ADI_FLAG_PF2,           // button 2
    ADI_FLAG_PF3            // button 3
};

ADI_FLAG_ID ezLEDToFlag[] = {  
    ADI_FLAG_PC4,           // led 0
    ADI_FLAG_PC5,           // led 1
    ADI_FLAG_PC6,           // led 2
    ADI_FLAG_PC7,           // led 3
    ADI_FLAG_PC8,           // led 4
    ADI_FLAG_PC9            // led 5
};
#endif



#if defined(__ADSP_BRAEMAR__)   // ADSP-BF537 EZ-Kit mappings
ADI_FLAG_ID ezButtonToFlag[] = {
    ADI_FLAG_PF2,           // button 0
    ADI_FLAG_PF3,           // button 1
    ADI_FLAG_PF4,           // button 2
    ADI_FLAG_PF5            // button 3
};
ADI_FLAG_ID ezLEDToFlag[] = {
    ADI_FLAG_PF6,           // led 0
    ADI_FLAG_PF7,           // led 1
    ADI_FLAG_PF8,           // led 2
    ADI_FLAG_PF9,           // led 3
    ADI_FLAG_PF10,          // led 4
    ADI_FLAG_PF11           // led 5
};
#endif

#if defined(__ADSP_TETON__)     // ADSP-BF561 EZ-Kit mappings
ADI_FLAG_ID ezButtonToFlag[] = {
    ADI_FLAG_PF5,           // button 0
    ADI_FLAG_PF6,           // button 1
    ADI_FLAG_PF7,           // button 2
    ADI_FLAG_PF8            // button 3
};
ADI_FLAG_ID ezLEDToFlag[] = {
    ADI_FLAG_PF40,          // led 0
    ADI_FLAG_PF41,          // led 1
    ADI_FLAG_PF42,          // led 2
    ADI_FLAG_PF43,          // led 3
    ADI_FLAG_PF44,          // led 4
    ADI_FLAG_PF45,          // led 5
    ADI_FLAG_PF46,          // led 6
    ADI_FLAG_PF47,          // led 7
    ADI_FLAG_PF32,          // led 8
    ADI_FLAG_PF33,          // led 9
    ADI_FLAG_PF34,          // led 10
    ADI_FLAG_PF35,          // led 11
    ADI_FLAG_PF36,          // led 12
    ADI_FLAG_PF37,          // led 13
    ADI_FLAG_PF38,          // led 14
    ADI_FLAG_PF39           // led 15
};

#endif

#if defined(__ADSP_MOAB__) // ADSP-BF54x EZ-Kit mappings
ADI_FLAG_ID ezButtonToFlag[] = {
    ADI_FLAG_PB8,           // button 1
    ADI_FLAG_PB9,           // button 2
    ADI_FLAG_PB10,          // button 3
    ADI_FLAG_PB11           // button 4
};

ADI_FLAG_ID ezLEDToFlag[] = {  
    ADI_FLAG_PG6,           // led 1
    ADI_FLAG_PG7,           // led 2
    ADI_FLAG_PG8,           // led 3
    ADI_FLAG_PG9,           // led 4
    ADI_FLAG_PG10,          // led 5
    ADI_FLAG_PG11           // led 6
};
#endif


/*********************************************************************

LED control

*********************************************************************/
static u32 LEDDisplay;      // bit field representing the LED display
static u32 LEDEnables;      // bit field representing the enabled LEDs



/*********************************************************************

function prototypes

*********************************************************************/
static void ezInitPower(u32 NumCores);


/*********************************************************************

    Function:       ezInit

    Description:    Initializes the EZ-Kit.  Specifically:
                    - configures async memories
                    - configures flash (where applicable)
                    - configures power to 600/120

*********************************************************************/
void ezInit(u32 NumCores)
{

    // configure async memory
#if defined(__ADSP_EDINBURGH__)         // ADSP-BF533 EZ-Kit specific info
    *pEBIU_AMBCTL0  = 0x7bb07bb0;   // Write access time = 7 cycles, read access time = 11 cycles, no ARDY
    *pEBIU_AMBCTL1  = 0x7bb07bb0;   // Hold time = 2 cycles, setup time = 3 cycles, transition time = 4 cycles
    *pEBIU_AMGCTL   = 0x00FF;
#endif

    // configure flash
#if defined(__ADSP_EDINBURGH__)         // ADSP-BF533 EZ-Kit specific info
    *pFlashA_PortA_Out = 0;         // resets port A to initial value
    *pFlashA_PortA_Dir = 0xFF;      // configure everything on port A as outputs
    *pFlashA_PortB_Out = 0;         // resets port B to initial value
    *pFlashA_PortB_Dir = 0x3f;      // configure everything on port B as outputs
#endif

#if defined(__ADSPBF561__)
	*pEBIU_AMBCTL0	= 0x7bb07bb0;	// Write access time = 7 cycles, read access time = 11 cycles, no ARDY
	*pEBIU_AMBCTL1	= 0x13d07bb0;	// bank 3 for NETCHIP device
	*pEBIU_AMGCTL	= 0x00FF;
#endif

    // configure power
    ezInitPower(NumCores);

}


/*********************************************************************

    Function:       ezInitPower

    Description:    Initializes and sets Power managwmentSDRAM parameters on the EZ-Kit.
                    (Replaces ezConfigurePLL & ezConfigureSDRAM )
                    Processor clock set to max in each case

*********************************************************************/

#define DO_NOT_CHANGE_MMR_SETTINGS 0

static void ezInitPower(u32 NumCores)
{
    ADI_EBIU_RESULT EBIUResult;
    ADI_PWR_RESULT  PWRResult;

#if defined (__ADSP_TETON__)
    ADI_PWR_COMMAND_PAIR ezkit_power[3];
#endif

    // It is important that the EBIU module is configured before Power module
    // so that changes to the clock frequencies are correctly reflected in the
    // SDRAM settings

    //Initializes the EBIU module
    ADI_EBIU_COMMAND_PAIR ezkit_sdram[] = {
#if defined (__ADSP_EDINBURGH__)
/*******************************************************************************
 For Rev 1.7 or newer EZ-Kit, configure SDRAM for 64MB, by uncommenting the following 
 line and commenting out the line after it. Rev 1.6 is used by default, for backward 
 compatibility. If "Use XML reset values" is selected in Settings->Target Options, 
 SDRAM will be configured by VDSP according to the values in "ADSP-BF533-proc.xml"
 found in ".../System/ArchDef".  For 1.7 edit that file according to the instructions 
 in the file.  If booting the application from flash, the SDRAM init code in the boot 
 stream must also agree with the SDRAM configuration values in the application.
*******************************************************************************/
 
//    { ADI_EBIU_CMD_SET_EZKIT, (void*)ADI_EBIU_EZKIT_BF533_REV1_7 },
      { ADI_EBIU_CMD_SET_EZKIT, (void*)ADI_EBIU_EZKIT_BF533 },    // for EZ-Kit Rev 1.6 and older


#elif defined(__ADSP_BRAEMAR__)
        { ADI_EBIU_CMD_SET_EZKIT, (void*)ADI_EBIU_EZKIT_BF537 },
#elif defined (__ADSP_TETON__)
        { ADI_EBIU_CMD_SET_EZKIT, (void*)ADI_EBIU_EZKIT_BF561 },   
#elif defined(__ADSP_STIRLING__)
        { ADI_EBIU_CMD_SET_EZKIT, (void*)ADI_EBIU_EZKIT_BF538 },
#endif
        { ADI_EBIU_CMD_END, 0}
    };
    EBIUResult = adi_ebiu_Init( ezkit_sdram, DO_NOT_CHANGE_MMR_SETTINGS );
    if ((EBIUResult != ADI_EBIU_RESULT_SUCCESS) && (EBIUResult != ADI_EBIU_RESULT_CALL_IGNORED)) {
        ezErrorCheck(EBIUResult);
    }

    //Initializes the power management module
#if defined (__ADSP_TETON__)

    u8 ic=0;
    ezkit_power[ic].kind  =  ADI_PWR_CMD_SET_EZKIT;
    ezkit_power[ic].value =  (void*)ADI_PWR_EZKIT_BF561_500MHZ;

    // for Teton (BF561) there is a choice between auto sync if NumCores >1 or
    // no synchronization - essential for single-core apps.

    if (NumCores>1) {
        ic++;
        // value field is superfluos for this command
        ezkit_power[ic].kind  =  ADI_PWR_CMD_SET_AUTO_SYNC_ENABLED;
    }
    ic++;
    // value field is superfluos for this command
    ezkit_power[ic].kind  =  ADI_PWR_CMD_END;

#else   // otherwise - Edinburgh  Braemar ot STirling


    ADI_PWR_COMMAND_PAIR ezkit_power[] = {
#if defined (__ADSP_EDINBURGH__)
        { ADI_PWR_CMD_SET_EZKIT, (void*)ADI_PWR_EZKIT_BF533_600MHZ },
#elif defined(__ADSP_BRAEMAR__)
        { ADI_PWR_CMD_SET_EZKIT, (void*)ADI_PWR_EZKIT_BF537_600MHZ },
#elif defined(__ADSP_STIRLING__)
        { ADI_PWR_CMD_SET_EZKIT, (void*)ADI_PWR_EZKIT_BF538_500MHZ },

#endif
        { ADI_PWR_CMD_END, 0}
    };
#endif

    PWRResult = adi_pwr_Init( ezkit_power );
    if ((PWRResult != ADI_PWR_RESULT_SUCCESS) && (PWRResult != ADI_PWR_RESULT_CALL_IGNORED)) {
        ezErrorCheck(PWRResult);
    }
    // Crank up speed to max possible
    
#if defined (__ADSP_EDINBURGH__)   

    // For 6V silicon, make sure VLEV is set at 1.3 so we can run at max frequency 
    PWRResult = adi_pwr_SetMaxFreqForVolt(ADI_PWR_VLEV_130);
 
#elif !defined (__ADSP_TETON__) || defined(__600_MHZ_TETON__)
    ezErrorCheck( adi_pwr_SetFreq( 0, 0, ADI_PWR_DF_NONE ) );

#else
    // This is safe, on boards with ADSP-BF561SKBC500X rev 0.2
    // There are issues with some BF561 EZ-kits for V >=1.2V
    ezErrorCheck( adi_pwr_SetMaxFreqForVolt( ADI_PWR_VLEV_115 ) );
#endif
}




/*********************************************************************

    Function:       ezInitLEDs

    Description:    Enables an LED for use

*********************************************************************/

void ezInitLED(u32 LED)    // enables an LED
{

    // make sure the LED is valid
    if (LED >= EZ_NUM_LEDS) return;

    // set the enable bit
    LEDEnables |= (1 << LED);

    // configure the flag for output
#if defined(__ADSP_BRAEMAR__) || defined (__ADSP_TETON__) || defined (__ADSP_STIRLING__) || defined (__ADSP_MOAB__)
    adi_flag_Open(ezLEDToFlag[LED]);
    adi_flag_SetDirection(ezLEDToFlag[LED], ADI_FLAG_DIRECTION_OUTPUT);
#endif

    // dim the LED
    ezTurnOffLED(LED);
}

/*********************************************************************

    Function:       ezTurnOnLED

    Description:    Lights an LED

*********************************************************************/

void ezTurnOnLED(u32 LED)   // lights an LED
{

    // update
    ezSetDisplay(LEDDisplay | (1 << LED));

}

/*********************************************************************

    Function:       ezTurnOffLED

    Description:    Dims an LED

*********************************************************************/

void ezTurnOffLED(u32 LED)  // dims an LED
{

    // update
    ezSetDisplay(LEDDisplay & ~(1 << LED));

}


/*********************************************************************

    Function:       ezToggleLED

    Description:    Toggles an LED

*********************************************************************/

void ezToggleLED(u32 LED)   // toggles an LED
{

    // update
    ezSetDisplay(LEDDisplay ^ (1 << LED));

}


/*********************************************************************

    Function:       ezTurnOnAllLEDs

    Description:    Lights all LEDs

*********************************************************************/

void ezTurnOnAllLEDs(void)  // lights all LEDs
{

    // update
    ezSetDisplay(0xffff);

}


/*********************************************************************

    Function:       ezTurnOffAllLEDs

    Description:    Dims all LEDs

*********************************************************************/

void ezTurnOffAllLEDs(void) // dims all LEDs
{

    // update
    ezSetDisplay(0);

}


/*********************************************************************

    Function:       ezToggleAllLEDs

    Description:    Toggles all LEDs

*********************************************************************/

void ezToggleAllLEDs(void)  // toggles all LEDs
{

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩欧美的一区二区| 国产精品夜夜嗨| 精品一区二区成人精品| 成人福利视频网站| 欧美一区二区三区免费视频| 中文字幕一区二区三中文字幕 | 日韩视频免费观看高清完整版在线观看 | 亚洲国产精品成人综合 | 日韩国产精品91| 在线观看欧美日本| 亚洲日本va在线观看| 久久色在线观看| 美国三级日本三级久久99| 欧美日韩国产美| 国产精品久久久久7777按摩 | 国产在线播放一区三区四| 欧美日韩一区视频| 国产乱码精品一区二区三| caoporen国产精品视频| 国产一区二区免费看| 国产精品国产三级国产有无不卡| 欧美午夜宅男影院| 国产在线看一区| 一区二区三区精品视频在线| 丁香婷婷深情五月亚洲| 中文字幕成人在线观看| av在线播放一区二区三区| 亚洲日本在线看| 日韩一区二区免费在线观看| 欧美日韩午夜精品| 欧美视频日韩视频在线观看| 成人美女在线视频| 天天亚洲美女在线视频| 亚洲欧美中日韩| 国产亚洲欧美日韩在线一区| 欧美性xxxxxxxx| 国产成人av影院| 极品美女销魂一区二区三区免费| ...中文天堂在线一区| 欧美精品aⅴ在线视频| 欧美专区日韩专区| 亚洲免费视频成人| 欧美欧美欧美欧美| 91视频xxxx| 国产精品中文字幕日韩精品| 精品一区二区三区免费视频| 国产精品福利一区二区三区| 亚洲色图在线看| 夜夜揉揉日日人人青青一国产精品| 久久久久久久av麻豆果冻| 日韩一二三四区| 一区二区三区国产豹纹内裤在线| 亚洲精品一区二区三区蜜桃下载| 久久综合成人精品亚洲另类欧美 | 欧美日韩国产综合久久| 亚洲精品你懂的| 欧美电影在哪看比较好| 麻豆精品在线观看| 国产嫩草影院久久久久| 色香蕉成人二区免费| 五月天激情小说综合| 精品va天堂亚洲国产| a在线欧美一区| 午夜伊人狠狠久久| 久久久久久久电影| 欧美日韩国产小视频| 国产一区二区三区综合| 亚洲一区欧美一区| 久久综合久色欧美综合狠狠| 91免费在线看| 狠狠色狠狠色综合系列| 一区二区三区91| 欧美精品一区二区精品网| 91在线国产福利| 黄色成人免费在线| 亚洲国产精品一区二区www | 欧美精品vⅰdeose4hd| 高清视频一区二区| 日韩精品欧美成人高清一区二区| 久久久噜噜噜久噜久久综合| 欧美蜜桃一区二区三区| 成人黄色电影在线| 久久国产成人午夜av影院| 亚洲综合色区另类av| 国产精品久久久爽爽爽麻豆色哟哟 | 欧美军同video69gay| 成人国产精品免费观看动漫| 青草国产精品久久久久久| 一区二区三区av电影| 欧美激情中文字幕| 精品区一区二区| 欧美日韩的一区二区| 成人午夜在线免费| 国产中文字幕精品| 久久99精品国产.久久久久久| 亚洲午夜精品网| 伊人开心综合网| 亚洲私人黄色宅男| 欧美极品少妇xxxxⅹ高跟鞋| 精品久久一二三区| 日韩精品一区二区三区中文不卡| 91国产成人在线| 91久久免费观看| 91丨porny丨最新| 91丨九色丨黑人外教| jizzjizzjizz欧美| caoporn国产精品| jlzzjlzz亚洲女人18| 99精品视频一区| 99视频一区二区三区| 91在线国产福利| 色美美综合视频| 欧美在线制服丝袜| 欧美四级电影网| 91麻豆精品91久久久久同性| 777奇米四色成人影色区| 91精品午夜视频| 日韩一级片网站| 欧美精品一区男女天堂| 国产人成一区二区三区影院| 国产精品网站一区| 亚洲婷婷在线视频| 亚洲国产精品视频| 美女视频一区在线观看| 国产高清成人在线| 成人av网站大全| 在线区一区二视频| 正在播放一区二区| 久久综合国产精品| 亚洲视频在线观看三级| 亚洲一二三区在线观看| 美女久久久精品| 99热精品国产| 欧美麻豆精品久久久久久| 精品少妇一区二区三区日产乱码| 久久久久久99精品| 亚洲黄色av一区| 美女高潮久久久| 处破女av一区二区| 欧洲国内综合视频| 日韩一区二区三区视频在线观看 | 欧美日韩国产欧美日美国产精品| 欧美日韩国产123区| 精品美女在线观看| 亚洲男女一区二区三区| 免费欧美日韩国产三级电影| 国产精品自拍在线| 欧美午夜免费电影| 国产亚洲视频系列| 首页国产欧美久久| 成人激情视频网站| 日韩三区在线观看| 亚洲视频资源在线| 捆绑变态av一区二区三区| 国产成人精品亚洲午夜麻豆| 欧美图区在线视频| 国产精品色在线观看| 天堂久久一区二区三区| aa级大片欧美| 久久综合久久综合久久| 亚洲综合网站在线观看| 国产乱人伦偷精品视频免下载 | av在线不卡观看免费观看| 欧美一区二区美女| 一区二区三区在线影院| 国模套图日韩精品一区二区 | 色天天综合久久久久综合片| 精品久久久久久综合日本欧美 | 日本一区二区免费在线观看视频| 亚洲一二三专区| 岛国精品在线播放| 精品sm捆绑视频| 日韩精品乱码av一区二区| 91久久精品一区二区三| 国产精品污污网站在线观看| 久久99国产精品麻豆| 欧美日韩精品免费| 亚洲欧美日韩综合aⅴ视频| 丁香啪啪综合成人亚洲小说 | 国产精品每日更新在线播放网址| 久久精品国产亚洲aⅴ| 欧美色视频在线观看| 专区另类欧美日韩| av日韩在线网站| 欧美国产精品劲爆| 国产91精品久久久久久久网曝门| 精品福利二区三区| 麻豆国产一区二区| 欧美v日韩v国产v| 人人爽香蕉精品| 91精品国产综合久久久久久久久久| 尤物视频一区二区| 日本高清视频一区二区| 一区二区三区四区精品在线视频| 成人av先锋影音| 亚洲视频一区在线观看| 91视视频在线观看入口直接观看www| 国产精品麻豆久久久| 成人自拍视频在线观看| 中文字幕在线一区二区三区|