亚洲欧美第一页_禁久久精品乱码_粉嫩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.3 $
$Date: 2007/06/14 15:20:05 $

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一区二区三区免费野_久草精品视频
一区二区三区在线视频观看58 | 国产精品麻豆一区二区| 久久久91精品国产一区二区三区| 日韩一区二区不卡| 久久伊99综合婷婷久久伊| 久久久精品免费观看| 亚洲一区二区在线免费观看视频| 日韩在线观看一区二区| 国产乱码一区二区三区| 粉嫩aⅴ一区二区三区四区五区| 国精产品一区一区三区mba桃花| 亚洲品质自拍视频网站| 亚洲风情在线资源站| 激情丁香综合五月| 91香蕉视频污在线| 欧美人狂配大交3d怪物一区 | 国产亚洲成aⅴ人片在线观看| 欧美一卡二卡在线| 国产精品久线在线观看| 夜夜嗨av一区二区三区| 久久成人羞羞网站| 色婷婷精品久久二区二区蜜臂av| 91年精品国产| 欧美大胆人体bbbb| 性久久久久久久| 国产传媒一区在线| 国产精品灌醉下药二区| 亚洲一区二区偷拍精品| 国产成都精品91一区二区三| 粉嫩av亚洲一区二区图片| 91麻豆精品国产91久久久久| 国产精品久久毛片av大全日韩| 免费av网站大全久久| 色综合久久中文字幕综合网 | 亚洲精品国久久99热| 国产在线麻豆精品观看| 欧美tk丨vk视频| 日本中文在线一区| 日韩一卡二卡三卡四卡| 婷婷六月综合网| 欧美日韩精品一区二区| 亚洲精品第一国产综合野| 色天天综合久久久久综合片| 国产亚洲综合性久久久影院| 精品在线亚洲视频| 久久精品一区二区三区四区| 国产成人亚洲综合a∨猫咪| 欧美日韩午夜在线视频| 亚洲在线视频一区| 成人动漫视频在线| 亚洲精品成a人| 欧美日产国产精品| 麻豆精品一区二区av白丝在线| 色综合欧美在线视频区| 日韩激情一二三区| 国产视频一区二区三区在线观看| 成人午夜激情影院| 亚洲影院理伦片| 久久亚洲春色中文字幕久久久| 国产尤物一区二区| 水蜜桃久久夜色精品一区的特点| 日韩一级完整毛片| 91在线视频播放| 精品一区二区三区香蕉蜜桃| 国产丝袜在线精品| 日韩一区二区在线观看视频播放| 韩国欧美国产一区| 亚洲一区二区精品久久av| 欧美日韩成人在线一区| 欧美在线免费观看视频| 国产毛片精品国产一区二区三区| 亚洲日本va午夜在线电影| 欧美草草影院在线视频| 欧美视频一区二区三区四区| 国产成人免费视频网站高清观看视频| 一区二区成人在线观看| 中文字幕不卡的av| 久久九九全国免费| 久久婷婷成人综合色| 色综合中文字幕| 色综合视频一区二区三区高清| 久久se这里有精品| 韩国欧美一区二区| 久久蜜桃av一区二区天堂| 成人黄色一级视频| 国产酒店精品激情| 久久国产人妖系列| 国产一区在线不卡| 久国产精品韩国三级视频| 国产精品美女久久久久aⅴ国产馆| 欧美大肚乱孕交hd孕妇| 欧美精品视频www在线观看| 精品视频免费在线| 欧美日韩一区小说| 欧美色图在线观看| 欧美丰满高潮xxxx喷水动漫| 欧美性猛片xxxx免费看久爱| 欧美午夜在线一二页| 在线观看91精品国产麻豆| 欧美日韩在线三级| 在线视频中文字幕一区二区| 69久久夜色精品国产69蝌蚪网| 在线观看亚洲精品视频| 日韩三级视频在线看| 日韩美女一区二区三区| 国产精品高清亚洲| 亚洲第一福利视频在线| 激情文学综合丁香| 99久久99久久免费精品蜜臀| www..com久久爱| 欧美精品国产精品| 中文字幕亚洲精品在线观看| 亚洲自拍欧美精品| 国产精品99精品久久免费| 91麻豆高清视频| 久久久精品中文字幕麻豆发布| 亚洲成a人片在线观看中文| 国产主播一区二区三区| 成人一区二区三区中文字幕| 欧美在线观看18| 国产精品超碰97尤物18| 日韩av电影天堂| 欧美色爱综合网| 尤物视频一区二区| 蜜臀久久99精品久久久久宅男| 国产电影精品久久禁18| 欧美日高清视频| 亚洲妇女屁股眼交7| 成人在线综合网站| 国产亚洲一区二区三区在线观看 | 久久免费看少妇高潮| 一区二区欧美国产| 国产一区二区三区四| 日韩一区二区三区视频在线| 国产又黄又大久久| 亚洲欧美一区二区三区国产精品 | 亚洲成人在线观看视频| 欧美www视频| a在线欧美一区| 秋霞国产午夜精品免费视频| xvideos.蜜桃一区二区| 91偷拍与自偷拍精品| 偷窥国产亚洲免费视频| 国产日产欧美一区| 欧美乱熟臀69xxxxxx| 精品一区二区三区影院在线午夜| 中文字幕佐山爱一区二区免费| 欧美亚洲愉拍一区二区| 成人av在线资源| 久久av中文字幕片| 一区二区成人在线| 亚洲男人的天堂在线观看| 日韩一区二区三免费高清| 色婷婷国产精品| 精品一区二区免费视频| 亚洲精品高清在线观看| 久久精品人人做人人爽人人| 欧美日韩精品一区二区三区四区 | 久久精品视频网| 欧美精品三级日韩久久| 91免费版在线| 国产成人精品午夜视频免费| 亚洲国产另类av| 亚洲欧美日韩一区二区| 欧美激情一区二区三区| 欧美videossexotv100| 欧美xxxx老人做受| 日韩色在线观看| 亚洲婷婷在线视频| 亚洲一区二区三区精品在线| 一区二区三区在线看| 一区二区三区欧美日韩| 亚洲国产欧美日韩另类综合| 亚洲综合在线五月| 午夜亚洲福利老司机| 精久久久久久久久久久| 蜜桃视频免费观看一区| 天使萌一区二区三区免费观看| 婷婷成人激情在线网| 国产一区二区在线电影| 国产电影精品久久禁18| 色综合久久久久综合体桃花网| 在线精品国精品国产尤物884a| 欧美揉bbbbb揉bbbbb| 久久男人中文字幕资源站| 1000精品久久久久久久久| 午夜av电影一区| 国产精品一区免费在线观看| 91在线看国产| 欧美精品电影在线播放| 日本一区免费视频| 国产精品传媒入口麻豆| 亚洲精品网站在线观看| 日韩国产精品久久久久久亚洲| 成人久久视频在线观看| 欧美疯狂做受xxxx富婆| 中文字幕一区二| 日韩av中文字幕一区二区| 99在线精品视频| 国产欧美综合色|