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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? mhpc.c

?? ppcboot2.0 華恒光盤里帶的BOOTLOADER
?? C
字號(hào):
/* * (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  = MAMR_GPL_B4DIS;    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);}/* ------------------------------------------------------------------------- */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国内精品久久久久影院色| 在线视频国内自拍亚洲视频| 久久激五月天综合精品| 日韩不卡手机在线v区| 偷拍亚洲欧洲综合| 婷婷综合另类小说色区| 美女在线观看视频一区二区| 欧美aaaaaa午夜精品| 日本中文字幕一区| 久久福利视频一区二区| 久久av资源网| 国产精品中文字幕日韩精品| 国产精品996| 不卡的av网站| 久久久久国产成人精品亚洲午夜| 日韩欧美专区在线| 2020日本不卡一区二区视频| 久久久国产精品不卡| 国产精品久久久久四虎| 亚洲精品午夜久久久| 亚洲国产成人高清精品| 免费在线一区观看| 国产在线看一区| www.亚洲免费av| 欧美在线观看视频在线| 日韩美女在线视频| 久久精品亚洲一区二区三区浴池 | 精品国产a毛片| 久久精品一区二区三区四区| 国产精品欧美一区喷水| 亚洲免费av观看| 日韩高清一级片| 国产一区二区三区久久久| 成人av电影在线网| 欧美吻胸吃奶大尺度电影| 日韩一区二区免费高清| 国产日韩欧美激情| 一区二区三区色| 麻豆专区一区二区三区四区五区| 国产91精品精华液一区二区三区 | 成人免费视频网站在线观看| 欧洲精品在线观看| 精品区一区二区| 中文字幕一区二区三区在线不卡| 亚洲v精品v日韩v欧美v专区| 黄色小说综合网站| 欧美自拍丝袜亚洲| 久久久久99精品国产片| 亚洲综合久久av| 国产一区二区三区视频在线播放| 99re这里只有精品视频首页| 日韩一区二区三区在线观看| 国产精品动漫网站| 免费黄网站欧美| 99久久久久久| 日韩欧美国产麻豆| 亚洲美女区一区| 狠狠色丁香久久婷婷综| 欧美中文一区二区三区| 久久精品在线观看| 亚洲成人一二三| 99国产精品国产精品久久| 欧美草草影院在线视频| 亚洲精品ww久久久久久p站 | 日韩精品一区二区三区蜜臀| 最好看的中文字幕久久| 久久99久久99小草精品免视看| 91色在线porny| 久久久久久久久久电影| 日本欧美韩国一区三区| 在线免费观看一区| 欧美激情一区三区| 久草中文综合在线| 欧美人妇做爰xxxⅹ性高电影| 自拍偷自拍亚洲精品播放| 国产一区二区在线观看免费| 欧美日韩成人在线| 有码一区二区三区| 成人精品视频一区| 久久久五月婷婷| 免费日本视频一区| 欧美日韩成人一区二区| 一区二区三区四区高清精品免费观看| 欧美日韩免费不卡视频一区二区三区| 中文字幕乱码亚洲精品一区| 国产一区二区三区久久久| 日韩欧美一区二区视频| 婷婷综合另类小说色区| 欧美午夜在线一二页| 亚洲你懂的在线视频| 91亚洲精品久久久蜜桃网站| 国产日韩av一区二区| 国产一区二区三区久久久 | 丝袜美腿亚洲色图| 欧美性生活大片视频| 亚洲美女视频一区| 一本色道亚洲精品aⅴ| 亚洲欧美福利一区二区| eeuss国产一区二区三区| 国产精品色哟哟网站| 成年人国产精品| 国产精品毛片大码女人| av影院午夜一区| 中文字幕一区二| 91在线高清观看| 亚洲欧美激情一区二区| 99久久久精品| 亚洲乱码日产精品bd| 91极品视觉盛宴| 一区二区三区久久久| 欧洲国内综合视频| 亚洲成人第一页| 欧美一级午夜免费电影| 久久av资源站| 国产日韩欧美综合在线| 国产999精品久久久久久| 国产精品美女一区二区| 91啪在线观看| 成人的网站免费观看| 中文字幕中文字幕一区| 欧美这里有精品| 日韩二区三区在线观看| 精品粉嫩超白一线天av| 国产成人在线观看| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 亚洲一二三专区| 在线成人免费视频| 国产一二三精品| 国产精品国产三级国产普通话99 | 国产精品亲子乱子伦xxxx裸| av爱爱亚洲一区| 亚洲国产美女搞黄色| 日韩欧美在线不卡| 国产成人精品免费网站| 一区二区三区精密机械公司| 欧美一区二区三区四区在线观看| 国产资源精品在线观看| 中文字幕日本乱码精品影院| 欧美系列在线观看| 黄色精品一二区| 国产精品久久久久久久久久久免费看 | 玉米视频成人免费看| 日韩午夜激情视频| 成人一区二区三区在线观看| 亚洲最快最全在线视频| 精品久久久久av影院| 99久久免费精品| 免费不卡在线观看| 国产精品国产自产拍在线| 精品视频在线看| 国产乱人伦偷精品视频免下载| 自拍视频在线观看一区二区| 6080亚洲精品一区二区| 成人免费看黄yyy456| 午夜欧美大尺度福利影院在线看| 久久综合色一综合色88| 欧美在线观看18| 国产一区亚洲一区| 亚洲成人资源网| 国产精品免费久久| 日韩女优av电影| 欧美制服丝袜第一页| 风流少妇一区二区| 日韩精品福利网| 亚洲丝袜制服诱惑| 久久综合国产精品| 7777精品伊人久久久大香线蕉 | 久久久国产午夜精品| 欧美日韩久久一区二区| 成人免费观看男女羞羞视频| 奇米精品一区二区三区在线观看| 亚洲色图视频网| 国产清纯白嫩初高生在线观看91 | 麻豆精品在线视频| 亚洲美女在线一区| 中日韩av电影| 精品999在线播放| 欧美日韩二区三区| 一道本成人在线| www.欧美色图| 国产一区二区看久久| 日一区二区三区| 亚洲一区二区三区国产| 亚洲图片你懂的| 国产三级欧美三级日产三级99 | 亚洲一区二区三区爽爽爽爽爽| 欧美激情综合五月色丁香| 精品国产凹凸成av人导航| 3d动漫精品啪啪一区二区竹菊| 色婷婷av一区二区三区之一色屋| 成人高清视频在线| 国产精品1024| 国产精品一区二区在线看| 蜜桃传媒麻豆第一区在线观看| 天天色 色综合| 午夜日韩在线观看| 亚洲国产成人av| 午夜免费久久看| 亚洲va韩国va欧美va精品| 亚洲第一在线综合网站|