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

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

?? ezkitutilities.c

?? ADI公司blackfin DSP開發(fā)板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.3 $
$Date: 2007/06/14 14:55:02 $

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
{

    // update

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美激情视频在线观看一区二区三区| 日韩不卡一二三区| 在线综合+亚洲+欧美中文字幕| 丁香桃色午夜亚洲一区二区三区| 免费高清成人在线| 看电影不卡的网站| 极品少妇xxxx精品少妇偷拍| 免费高清在线一区| 国产精品一区三区| 不卡的av电影| 色悠悠久久综合| 日本韩国一区二区| 欧美电影在线免费观看| 日韩一区二区三区在线观看 | 五月天欧美精品| 亚洲综合图片区| 三级一区在线视频先锋| 免费观看在线综合| 处破女av一区二区| 欧美性猛交xxxx黑人交| 日韩你懂的在线播放| 久久精品免视看| 中文字幕在线不卡一区二区三区| 亚洲欧美成aⅴ人在线观看| 亚洲一区二区影院| 美女一区二区久久| 精品久久国产字幕高潮| 国产精品美女久久久久aⅴ| 中文字幕色av一区二区三区| 亚洲综合成人在线| 久久福利视频一区二区| 高清国产一区二区三区| 欧美私模裸体表演在线观看| 欧美成人激情免费网| 中文字幕日本乱码精品影院| 日韩国产精品久久| 丰满亚洲少妇av| 91精品中文字幕一区二区三区| 精品999在线播放| 一区二区三区在线观看网站| 精品一区二区在线看| 在线观看视频欧美| 日本一区二区三区免费乱视频 | 日韩三级视频在线看| 国产精品欧美一级免费| 石原莉奈在线亚洲三区| 国产寡妇亲子伦一区二区| 欧美性猛交xxxxxx富婆| 日本一区二区视频在线| 亚洲国产综合在线| 成人亚洲一区二区一| 欧美一区二区三区日韩| 一区二区三区中文免费| 精品一区二区三区免费| 播五月开心婷婷综合| 欧美三级三级三级爽爽爽| 国产欧美精品区一区二区三区 | 欧美大片国产精品| 亚洲成人av福利| 色综合久久综合中文综合网| 久久精品一区二区三区不卡 | 亚洲激情校园春色| 国产·精品毛片| 久久男人中文字幕资源站| 午夜在线电影亚洲一区| 国产成a人亚洲精品| 日韩欧美亚洲国产精品字幕久久久| 亚洲一区二区三区四区不卡| 99综合电影在线视频| 国产精品欧美极品| 成人激情开心网| 国产精品国产三级国产| 风间由美一区二区av101| 国产日韩欧美一区二区三区综合| 美女高潮久久久| 精品99一区二区| 国产很黄免费观看久久| www久久精品| 国产一区在线观看视频| 91黄色免费网站| 国产精品美女久久久久久2018| 久久精品亚洲精品国产欧美kt∨| 国内成人精品2018免费看| 欧美老年两性高潮| 奇米亚洲午夜久久精品| 精品伦理精品一区| 国产一区二区三区免费在线观看| 欧美精品一区二区久久婷婷| 国产一区二区三区在线观看免费| www一区二区| 波波电影院一区二区三区| 日本一区二区三级电影在线观看 | 91免费版在线| 亚洲欧美在线视频| 91久久免费观看| 视频一区二区不卡| 久久久夜色精品亚洲| 粉嫩aⅴ一区二区三区四区 | 精品粉嫩aⅴ一区二区三区四区| 精品一区免费av| 国产精品久久三| 欧美日韩三级在线| 国产美女精品人人做人人爽| 久久综合久久综合亚洲| 91丨porny丨国产入口| 日韩精品一二区| 欧美激情资源网| 欧美久久高跟鞋激| 国产午夜精品一区二区| 欧美视频在线一区二区三区| 久久se这里有精品| 精品捆绑美女sm三区| 久久久精品免费免费| 成人免费看片app下载| 欧美在线观看一区| 国产精品一区一区三区| 亚洲综合另类小说| 国产欧美一区二区精品久导航 | 亚洲福利视频一区| 中文无字幕一区二区三区| 在线成人av网站| 北条麻妃国产九九精品视频| 日本成人在线网站| 亚洲精选视频免费看| 日韩精品一区在线| 91蝌蚪国产九色| 亚洲国产欧美在线| 国产欧美视频在线观看| 欧美一二三区在线| 欧美中文一区二区三区| 精品中文字幕一区二区| 亚洲第一久久影院| 亚洲色图视频免费播放| 久久精品视频在线看| 91麻豆精品国产91久久久资源速度 | 国产精品毛片大码女人| 91麻豆免费观看| 国产激情一区二区三区四区 | 亚洲777理论| 亚洲女女做受ⅹxx高潮| 欧美激情一区在线| 久久精品亚洲一区二区三区浴池 | 麻豆精品新av中文字幕| 亚洲国产一区二区三区青草影视 | 婷婷夜色潮精品综合在线| 亚洲视频一区二区在线观看| 久久午夜免费电影| 久久影音资源网| 精品成人一区二区| 精品久久久久av影院| 日韩精品自拍偷拍| 欧美va日韩va| 久久影院午夜论| 国产亚洲欧洲997久久综合| 欧美精品一区二区不卡 | 国产成人免费视频一区| 国产一区二区成人久久免费影院| 久久国产生活片100| 国产资源精品在线观看| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 亚洲高清免费一级二级三级| 一区二区三区中文字幕精品精品 | 国产欧美一区在线| 中文一区二区完整视频在线观看 | 欧美在线一二三四区| 欧洲日韩一区二区三区| 欧美日韩在线播放三区四区| 精品视频资源站| 日韩片之四级片| 欧美精品一区二区高清在线观看| 久久毛片高清国产| 亚洲欧洲日韩女同| 亚洲线精品一区二区三区| 丝袜诱惑亚洲看片| 国产一区不卡视频| 不卡的av中国片| 欧美日韩成人在线一区| 欧美精品一区男女天堂| 国产精品久久久久国产精品日日| 亚洲免费观看高清在线观看| 亚洲成av人影院在线观看网| 日韩国产在线观看一区| 图片区小说区区亚洲影院| 精品伊人久久久久7777人| 99久免费精品视频在线观看 | 九九热在线视频观看这里只有精品| 国产福利91精品| 色av成人天堂桃色av| 日韩欧美电影一区| 中文字幕中文字幕在线一区 | 国产网红主播福利一区二区| 中文字幕视频一区| 日韩av中文字幕一区二区三区| 国产真实乱对白精彩久久| 99国产精品99久久久久久| 91精品国产欧美一区二区18| 久久天堂av综合合色蜜桃网 | 9191国产精品| 国产精品久久午夜夜伦鲁鲁| 日韩专区一卡二卡|