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

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

?? mhpc.c

?? uboot for at91rm9200dk
?? C
字號:
/* * (C) Copyright 2001 * ELTEC Elektronik AG * Frank Gottschling <fgottschling@eltec.de> * * Board specific routines for the miniHiPerCam * * - initialisation (eeprom) * - memory controller * - serial io initialisation * - ethernet io initialisation * * ----------------------------------------------------------------- * See file CREDITS for list of people who contributed to this * project. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA */#include <common.h>#include <linux/ctype.h>#include <commproc.h>#include "mpc8xx.h"#include <video_fb.h>/* imports from common/main.c */extern char console_buffer[CFG_CBSIZE];extern void eeprom_init  (void);extern int  eeprom_read  (unsigned dev_addr, unsigned offset,			  unsigned char *buffer, unsigned cnt);extern int  eeprom_write (unsigned dev_addr, unsigned offset,			  unsigned char *buffer, unsigned cnt);/* globals */void *video_hw_init(void);void video_set_lut (unsigned int index,     /* color number */		    unsigned char r,        /* red */		    unsigned char g,        /* green */		    unsigned char b         /* blue */		    );GraphicDevice gdev;/* locals */static void video_circle (char *center, int radius, int color, int pitch);static void video_test_image (void);static void video_default_lut (unsigned int clut_type);/* revision info foer MHPC EEPROM offset 480 */typedef struct  {    char    board[12];      /* 000 - Board Revision information */    char    sensor;         /* 012 - Sensor Type information */    char    serial[8];      /* 013 - Board serial number */    char    etheraddr[6];   /* 021 - Ethernet node addresse */    char    revision[2];    /* 027 - Revision code */    char    option[3];      /* 029 - resevered for options */} revinfo;/* ------------------------------------------------------------------------- */static const unsigned int sdram_table[] ={    /* read single beat cycle */    0xef0efc04, 0x0e2dac04, 0x01ba5c04, 0x1ff5fc00,    0xfffffc05, 0xeffafc34, 0x0ff0bc34, 0x1ff57c35,    /* read burst cycle */    0xef0efc04, 0x0e3dac04, 0x10ff5c04, 0xf0fffc00,    0xf0fffc00, 0xf1fffc00, 0xfffffc00, 0xfffffc05,    0xfffffc04, 0xfffffc04, 0xfffffc04, 0xfffffc04,    0xfffffc04, 0xfffffc04, 0xfffffc04, 0xfffffc04,    /* write single beat cycle */    0xef0efc04, 0x0e29ac00, 0x01b25c04, 0x1ff5fc05,    0xfffffc04, 0xfffffc04, 0xfffffc04, 0xfffffc04,    /* write burst cycle */    0xef0ef804, 0x0e39a000, 0x10f75000, 0xf0fff440,    0xf0fffc40, 0xf1fffc04, 0xfffffc05, 0xfffffc04,    0xfffffc04, 0xfffffc04, 0xfffffc04, 0xfffffc04,    0xfffffc04, 0xfffffc04, 0xfffffc04, 0xfffffc04,    /* periodic timer expired */    0xeffebc84, 0x1ffd7c04, 0xfffffc04, 0xfffffc84,    0xeffebc04, 0x1ffd7c04, 0xfffffc04, 0xfffffc05,    0xfffffc04, 0xfffffc04, 0xfffffc04, 0xfffffc04,    /* exception */    0xfffffc04, 0xfffffc05, 0xfffffc04, 0xfffffc04};/* ------------------------------------------------------------------------- */int board_pre_init (void){    volatile immap_t  *im = (immap_t *)CFG_IMMR;    volatile cpm8xx_t *cp = &(im->im_cpm);    volatile iop8xx_t *ip = (iop8xx_t *)&(im->im_ioport);    /* reset the port A s.a. cpm-routines */    ip->iop_padat = 0x0000;    ip->iop_papar = 0x0000;    ip->iop_padir = 0x0800;    ip->iop_paodr = 0x0000;    /* reset the port B for digital and LCD output */    cp->cp_pbdat  = 0x0300;    cp->cp_pbpar  = 0x5001;    cp->cp_pbdir  = 0x5301;    cp->cp_pbodr  = 0x0000;    /* reset the port C configured for SMC1 serial port and aqc. control */    ip->iop_pcdat = 0x0800;    ip->iop_pcpar = 0x0000;    ip->iop_pcdir = 0x0e30;    ip->iop_pcso  = 0x0000;    /* Config port D for LCD output */    ip->iop_pdpar = 0x1fff;    ip->iop_pddir = 0x1fff;    return (0);}/* ------------------------------------------------------------------------- *//* * Check Board Identity */int checkboard (void){    puts ("Board: ELTEC miniHiperCam\n");    return(0);}/* ------------------------------------------------------------------------- */int misc_init_r(void){    revinfo  mhpcRevInfo;    char     nid[32];    char     *mhpcSensorTypes[] = { "OMNIVISON OV7610/7620 color",				    "OMNIVISON OV7110 b&w", NULL };    char     hex[23] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0,			 0, 0, 0, 0, 10, 11, 12, 13, 14, 15 };    int      i;    /* check revision data */    eeprom_read (CFG_I2C_EEPROM_ADDR, 480, (char*)&mhpcRevInfo, 32);    if (strncmp((char *)&mhpcRevInfo.board[2], "MHPC", 4) != 0)    {    printf ("Enter revision number (0-9): %c  ", mhpcRevInfo.revision[0]);    if (0 != readline (NULL))    {	mhpcRevInfo.revision[0] = (char)toupper(console_buffer[0]);    }    printf ("Enter revision character (A-Z): %c  ", mhpcRevInfo.revision[1]);    if (1 == readline (NULL))    {	mhpcRevInfo.revision[1] = (char)toupper(console_buffer[0]);    }    printf("Enter board name (V-XXXX-XXXX): %s  ", (char *)&mhpcRevInfo.board);    if (11 == readline (NULL))    {	for (i=0; i<11; i++)	{	    mhpcRevInfo.board[i] =  (char)toupper(console_buffer[i]);	    mhpcRevInfo.board[11] = '\0';	}    }    printf("Supported sensor types:\n");    i=0;    do    {	printf("\n    \'%d\' : %s\n", i, mhpcSensorTypes[i]);    } while ( mhpcSensorTypes[++i] != NULL );    do    {	printf("\nEnter sensor number (0-255): %d  ", (int)mhpcRevInfo.sensor );	if (0 != readline (NULL))	{	mhpcRevInfo.sensor = (unsigned char)simple_strtoul(console_buffer, NULL, 10);	}    } while ( mhpcRevInfo.sensor >= i );    printf("Enter serial number: %s ", (char *)&mhpcRevInfo.serial );    if (6 == readline (NULL))    {	for (i=0; i<6; i++)	{	mhpcRevInfo.serial[i] = console_buffer[i];	}	mhpcRevInfo.serial[6] = '\0';    }    printf("Enter ether node ID with leading zero (HEX): %02x%02x%02x%02x%02x%02x  ",	      mhpcRevInfo.etheraddr[0], mhpcRevInfo.etheraddr[1],	      mhpcRevInfo.etheraddr[2], mhpcRevInfo.etheraddr[3],	      mhpcRevInfo.etheraddr[4], mhpcRevInfo.etheraddr[5]  );    if (12 == readline (NULL))    {	for (i=0; i<12; i+=2)	{	mhpcRevInfo.etheraddr[i>>1] = (char)(16*hex[toupper(console_buffer[i])-'0'] +			     hex[toupper(console_buffer[i+1])-'0']);	}    }    /* setup new revision data */    eeprom_write (CFG_I2C_EEPROM_ADDR, 480, (char*)&mhpcRevInfo, 32);    }    /* set environment */    sprintf( nid, "%02x:%02x:%02x:%02x:%02x:%02x",		  mhpcRevInfo.etheraddr[0], mhpcRevInfo.etheraddr[1],		  mhpcRevInfo.etheraddr[2], mhpcRevInfo.etheraddr[3],		  mhpcRevInfo.etheraddr[4], mhpcRevInfo.etheraddr[5]);    setenv("ethaddr", nid);    /* print actual board identification */    printf("Ident: %s %s Ser %s Rev %c%c\n",	    mhpcRevInfo.board, (mhpcRevInfo.sensor==0?"color":"b&w"),	    (char *)&mhpcRevInfo.serial,	    mhpcRevInfo.revision[0], mhpcRevInfo.revision[1]);    return (0);}/* ------------------------------------------------------------------------- */long int initdram (int board_type){    volatile immap_t     *immap  = (immap_t *)CFG_IMMR;    volatile memctl8xx_t *memctl = &immap->im_memctl;    upmconfig(UPMA, (uint *)sdram_table, sizeof(sdram_table)/sizeof(uint));    memctl->memc_mamr  = CFG_MAMR & (~(MAMR_PTAE)); /* no refresh yet */    memctl->memc_mbmr  = MBMR_GPL_B4DIS;	/* should this be mamr? - NTL */    memctl->memc_mptpr = MPTPR_PTP_DIV64;    memctl->memc_mar   = 0x00008800;    /*     * Map controller SDRAM bank 0     */    memctl->memc_or1 = CFG_OR1_PRELIM;    memctl->memc_br1 = CFG_BR1_PRELIM;    udelay(200);    /*     * Map controller SDRAM bank 1     */    memctl->memc_or2 = CFG_OR2;    memctl->memc_br2 = CFG_BR2;    /*     * Perform SDRAM initializsation sequence     */    memctl->memc_mcr  = 0x80002105;    /* SDRAM bank 0 */    udelay(1);    memctl->memc_mcr  = 0x80002730;    /* SDRAM bank 0 - execute twice */    udelay(1);    memctl->memc_mamr |= MAMR_PTAE;    /* enable refresh */    udelay(10000);    /* leave place for framebuffers */    return (SDRAM_MAX_SIZE-SDRAM_RES_SIZE);}/* ------------------------------------------------------------------------- */static void video_circle (char *center, int radius, int color, int pitch){    int x,y,d,dE,dSE;    x   = 0;    y   = radius;    d   = 1-radius;    dE  = 3;    dSE = -2*radius+5;    *(center+x+y*pitch) = color;    *(center+y+x*pitch) = color;    *(center+y-x*pitch) = color;    *(center+x-y*pitch) = color;    *(center-x-y*pitch) = color;    *(center-y-x*pitch) = color;    *(center-y+x*pitch) = color;    *(center-x+y*pitch) = color;    while(y>x)    {	if (d<0)	{	    d   += dE;	    dE  += 2;	    dSE += 2;	    x++;	}	else	{	    d   += dSE;	    dE  += 2;	    dSE += 4;	    x++;	    y--;	}	*(center+x+y*pitch) = color;	*(center+y+x*pitch) = color;	*(center+y-x*pitch) = color;	*(center+x-y*pitch) = color;	*(center-x-y*pitch) = color;	*(center-y-x*pitch) = color;	*(center-y+x*pitch) = color;	*(center-x+y*pitch) = color;    }}/* ------------------------------------------------------------------------- */static void video_test_image(void){    char *di;    int i, n;    /* draw raster */    for (i=0; i<LCD_VIDEO_ROWS; i+=32)    {	memset((char*)(LCD_VIDEO_ADDR+i*LCD_VIDEO_COLS), LCD_VIDEO_FG, LCD_VIDEO_COLS);	for (n=i+1;n<i+32;n++)	    memset((char*)(LCD_VIDEO_ADDR+n*LCD_VIDEO_COLS), LCD_VIDEO_BG, LCD_VIDEO_COLS);    }    for (i=0; i<LCD_VIDEO_COLS; i+=32)    {	for (n=0; n<LCD_VIDEO_ROWS; n++)	    *(char*)(LCD_VIDEO_ADDR+n*LCD_VIDEO_COLS+i) = LCD_VIDEO_FG;    }    /* draw gray bar */    di = (char *)(LCD_VIDEO_ADDR + (LCD_VIDEO_COLS-256)/64*32 + 97*LCD_VIDEO_COLS);    for (n=0; n<63; n++)    {	for (i=0; i<256; i++)	{	    *di++ = (char)i;	    *(di+LCD_VIDEO_COLS*64) = (i&1)*255;	}	di += LCD_VIDEO_COLS-256;    }    video_circle ((char*)LCD_VIDEO_ADDR+LCD_VIDEO_COLS/2+LCD_VIDEO_ROWS/2*LCD_VIDEO_COLS,		  LCD_VIDEO_ROWS/2,LCD_VIDEO_FG, LCD_VIDEO_COLS);}/* ------------------------------------------------------------------------- */static void video_default_lut (unsigned int clut_type){    unsigned int i;    unsigned char RGB[] =	{	0x00, 0x00, 0x00,   /* black */	0x80, 0x80, 0x80,   /* gray */	0xff, 0x00, 0x00,   /* red */	0x00, 0xff, 0x00,   /* green */	0x00, 0x00, 0xff,   /* blue */	0x00, 0xff, 0xff,   /* cyan */	0xff, 0x00, 0xff,   /* magenta */	0xff, 0xff, 0x00,   /* yellow */	0x80, 0x00, 0x00,   /* dark red */	0x00, 0x80, 0x00,   /* dark green */	0x00, 0x00, 0x80,   /* dark blue */	0x00, 0x80, 0x80,   /* dark cyan */	0x80, 0x00, 0x80,   /* dark magenta */	0x80, 0x80, 0x00,   /* dark yellow */	0xc0, 0xc0, 0xc0,   /* light gray */	0xff, 0xff, 0xff,   /* white */	};    switch (clut_type)    {    case 1:	for (i=0; i<240; i++)	    video_set_lut (i, i, i, i);	for (i=0; i<16; i++)	    video_set_lut (i+240, RGB[i*3], RGB[i*3+1], RGB[i*3+2]);	break;    default:	for (i=0; i<256; i++)	    video_set_lut (i, i, i, i);    }}/* ------------------------------------------------------------------------- */void *video_hw_init (void){    unsigned int clut = 0;    unsigned char *penv;    immap_t *immr = (immap_t *) CFG_IMMR;    /* enable video only on CLUT value */    if ((penv = getenv ("clut")) != NULL)	clut = (u_int)simple_strtoul (penv, NULL, 10);    else	return NULL;    /* disable graphic before write LCD regs. */    immr->im_lcd.lcd_lccr = 0x96000866;    /* config LCD regs. */    immr->im_lcd.lcd_lcfaa = LCD_VIDEO_ADDR;    immr->im_lcd.lcd_lchcr = 0x010a0093;    immr->im_lcd.lcd_lcvcr = 0x900f0024;    printf ("Video: 640x480 8Bit Index Lut %s\n",	    (clut==1?"240/16 (gray/vga)":"256(gray)"));    video_default_lut (clut);    /* clear framebuffer */    memset ( (char*)(LCD_VIDEO_ADDR), LCD_VIDEO_BG, LCD_VIDEO_ROWS*LCD_VIDEO_COLS );    /* enable graphic */    immr->im_lcd.lcd_lccr = 0x96000867;    /* fill in Graphic Device */    gdev.frameAdrs = LCD_VIDEO_ADDR;    gdev.winSizeX = LCD_VIDEO_COLS;    gdev.winSizeY = LCD_VIDEO_ROWS;    gdev.gdfBytesPP = 1;    gdev.gdfIndex = GDF__8BIT_INDEX;    if (clut > 1)	/* return Graphic Device for console */	return (void *)&gdev;    else	/* just graphic enabled - draw something beautiful */	video_test_image();    return NULL;            /* this disabels cfb - console */}/* ------------------------------------------------------------------------- */void video_set_lut (unsigned int index,		    unsigned char r, unsigned char g, unsigned char b){    unsigned int lum;    unsigned short *pLut = (unsigned short *)(CFG_IMMR + 0x0e00);    /* 16 bit lut values, 12 bit used, xxxx BBGG RRii iiii */    /* y = 0.299*R + 0.587*G + 0.114*B */    lum = (2990*r + 5870*g + 1140*b)/10000;    pLut[index] = ((b & 0xc0)<<4) | ((g & 0xc0)<<2) | (r & 0xc0) | (lum & 0x3f);}/* ------------------------------------------------------------------------- */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产电影一区二区三区| 美女在线视频一区| 色婷婷久久综合| 一区二区三区自拍| 制服丝袜av成人在线看| 琪琪一区二区三区| 亚洲国产精品国自产拍av| 不卡在线观看av| 亚洲综合在线观看视频| 91麻豆精品国产| 国产精一区二区三区| 国产精品国产三级国产有无不卡| 99re热这里只有精品视频| 亚洲精品视频免费观看| 日韩久久一区二区| 久久99精品国产| 麻豆精品一区二区| 午夜精品福利在线| 国产精品中文字幕日韩精品| 亚洲午夜激情网页| 天堂蜜桃91精品| 国产成人一区在线| 亚洲精品欧美激情| 欧美一区二区精美| 波多野结衣一区二区三区| 亚洲福中文字幕伊人影院| 欧美成人伊人久久综合网| 99国产精品久久久| 奇米色一区二区| 亚洲欧洲一区二区三区| 日韩一级片在线观看| 91香蕉视频污| 国产综合色视频| 亚洲成人黄色影院| 久久先锋影音av鲁色资源网| 成人美女视频在线观看| 婷婷一区二区三区| 中文字幕中文字幕在线一区| 日韩精品综合一本久道在线视频| 91视频在线观看| 久久国产福利国产秒拍| 一区二区三区精品在线| 久久久国产精品午夜一区ai换脸| 欧美在线免费视屏| 成人丝袜18视频在线观看| 蜜桃视频一区二区三区在线观看| 亚洲美女精品一区| 国产亚洲精久久久久久| 日韩一级在线观看| 欧美人与z0zoxxxx视频| 91小宝寻花一区二区三区| 国产盗摄一区二区| 另类小说综合欧美亚洲| 五月婷婷另类国产| 一区二区成人在线视频| 中文字幕一区二区三区蜜月 | 国产美女视频一区| 亚洲一二三四在线| 亚洲同性同志一二三专区| 久久久精品国产免大香伊| 欧美一级欧美三级在线观看| 色噜噜狠狠色综合中国| 91在线精品一区二区三区| 国产成人欧美日韩在线电影| 国产在线精品免费| 国产一区二区三区电影在线观看 | 一区二区三区欧美在线观看| 久久精品亚洲一区二区三区浴池 | 国产在线国偷精品产拍免费yy| 色婷婷国产精品| 麻豆91在线播放免费| 亚洲国产精品成人久久综合一区| 大尺度一区二区| 久久综合九色欧美综合狠狠 | 久久精品99久久久| 亚洲三级在线看| 日本视频一区二区| 一区二区三区四区视频精品免费| 国产精品久久久久久久浪潮网站| 国产亚洲欧美一区在线观看| 久久美女艺术照精彩视频福利播放| 精品国产乱码久久久久久1区2区 | 色哟哟一区二区| 在线观看日韩电影| 欧美疯狂性受xxxxx喷水图片| 9191成人精品久久| 欧美mv日韩mv国产| 欧美激情在线免费观看| 国产精品久久久久久久久快鸭| |精品福利一区二区三区| 最新热久久免费视频| 亚洲精品国产精品乱码不99| 亚洲精品乱码久久久久| 一区av在线播放| 亚洲一二三四久久| 麻豆国产精品视频| 国产白丝精品91爽爽久久| 福利一区在线观看| 91小视频在线免费看| 欧美午夜电影一区| 日韩一区二区在线播放| 久久久久国产一区二区三区四区| 国产日韩欧美精品一区| 亚洲三级理论片| 亚洲成人一区在线| 日本vs亚洲vs韩国一区三区| 精品写真视频在线观看 | 激情综合网av| av午夜一区麻豆| 在线观看免费一区| 精品精品国产高清一毛片一天堂| 国产亚洲精品久| 一区二区三区高清不卡| 精品一区在线看| 91麻豆免费看片| 欧美变态tickling挠脚心| 中文字幕在线不卡一区 | 国产午夜亚洲精品不卡| 一区二区激情视频| 精品一区二区三区久久久| 国产精品一区二区你懂的| 精品国产乱码久久久久久图片| 欧美韩日一区二区三区四区| 色呦呦一区二区三区| 91麻豆精品91久久久久同性| 精品久久人人做人人爽| 亚洲国产成人午夜在线一区| 一区二区在线观看视频| 日韩精品一二区| 久久综合综合久久综合| youjizz国产精品| 精品捆绑美女sm三区| 日本成人超碰在线观看| 不卡的电影网站| 国产福利一区二区三区视频 | 欧美在线free| 国产日韩亚洲欧美综合| 亚洲精品国产第一综合99久久| 亚洲欧美日韩成人高清在线一区| 欧美视频精品在线| 国产日韩精品一区二区三区 | 有坂深雪av一区二区精品| 日韩不卡一区二区三区| www.欧美色图| 日韩美女主播在线视频一区二区三区| 亚洲欧美另类小说视频| 成人网页在线观看| 亚洲精品一区二区三区99| 日本在线不卡视频| 91黄视频在线| 亚洲欧美另类图片小说| 成人精品视频.| 国产日韩欧美一区二区三区综合 | 亚洲黄色av一区| 国产sm精品调教视频网站| 日韩网站在线看片你懂的| 亚洲高清免费一级二级三级| 在线观看亚洲专区| 亚洲精品成人在线| 99天天综合性| 中文字幕精品—区二区四季| 国产一区999| 精品少妇一区二区三区日产乱码| 日韩av在线发布| 欧美一区二区视频免费观看| 亚洲成a人片在线观看中文| 91极品视觉盛宴| 一区二区三区波多野结衣在线观看| 91视频在线看| 亚洲综合男人的天堂| 欧洲在线/亚洲| 亚洲成人综合视频| 欧美精品第1页| 喷白浆一区二区| 久久一留热品黄| 成人免费毛片app| 亚洲欧洲av另类| 欧美亚洲国产一区二区三区va| 亚洲成人在线网站| 欧美一区二区三区免费观看视频| 奇米色一区二区| 国产亚洲欧美日韩在线一区| jlzzjlzz亚洲日本少妇| 亚洲美女屁股眼交| 欧美丰满少妇xxxxx高潮对白| 亚洲午夜激情av| 精品久久国产字幕高潮| 国产成人精品综合在线观看| 成人欧美一区二区三区小说| 在线观看免费一区| 美美哒免费高清在线观看视频一区二区 | 美国毛片一区二区三区| 精品国产一区二区三区不卡 | 久久婷婷国产综合精品青草| 日韩午夜在线观看视频| 91麻豆高清视频| 欧美亚一区二区| 欧美性猛交一区二区三区精品| 成人免费的视频| 色综合久久综合中文综合网|