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

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

?? sysmotvpdutil.c

?? This file contains board-specific information for the Motorola LoPEC in support of the lopec BSP. S
?? C
?? 第 1 頁 / 共 2 頁
字號:
** RETURNS: A pointer to the desired packet and OK if the packet was found,*          otherwise it returns ERROR.** SEE ALSO: sysVpdPktParse()*/STATUS sysVpdPktGet    (    UCHAR         vpdType,     /* target packet type */    UINT32        vpdInstance, /* instance number of desired packet (0-based) */    VPD_PACKET ** pVpdPtr,     /* address of the array of packet pointers */    VPD_PACKET ** pVpdPacket   /* address of the return variable */    )    {    UCHAR        type;         /* current packet type */    VPD_PACKET * p;            /* pointer to current packet */    /* if the first pointer in the array is NULL, return an error indication. */    if (*pVpdPtr == NULL)        return (ERROR);    do        {        /* get the current packet pointer */        p = *pVpdPtr;        /* if the packet type matches the caller's requested type */        if ( (type = p->type) == vpdType )            {            /*             * see if the type is an ethernet address and has a trailing             * instance value. if it does, see of the instance number matches             * the caller's requested instance.             */            if ( (vpdType == VPD_PID_EA) &&                 (p->size == ENET_INSTANCE_SIZE) &&                 (vpdInstance == p->data[ENET_INSTANCE_SIZE-1]) )                {                *pVpdPacket = p;                return (OK);                }            else                {                /*                 * see if this is the instance the caller requested, if not                 * decrement the instance count and go around again.                 */                if (vpdInstance-- == 0)                    {                    *pVpdPacket = p;                    return (OK);                    }                }            }        /* advance to the next packet. */        pVpdPtr++;        /* terminate on reaching the term packet. */        } while ( type != VPD_PID_TERM);    return (ERROR);    }/******************************************************************************** sysVpdPktRead - read a packet vital product data structure.** This routine searches the vpd in I2C looking for the specified * instance of a specific packet type.  The routine takes the number* of data bytes to read in an effort to reduce I2C cycles.** RETURNS: OK, if successful or ERROR if unsuccessful.**/STATUS sysVpdPktRead    (    UCHAR         devAdrs,     /* i2c address of the serial eeprom */    UCHAR         devOffset,   /* offset to vpd within the serial eeprom */    UCHAR         vpdType,     /* target packet type */    UINT32        vpdInstance, /* instance number of desired packet (0-based) */    VPD_PACKET    *packet,     /* pointer to packet to fill out */    UINT32        numBytes     /* number of data bytes to read */     )    {    UINT32        currentOffset;    currentOffset = 0;    do        {        /* Read the next vpd packet.  Add the type and size to numBytes. */        if (I2C_BYTE_RANGE_READ (devAdrs,                      devOffset + sizeof(VPD_HEADER) + currentOffset,                      numBytes + 2, (UCHAR *)packet) != OK)            return (ERROR);        /*         * Compare the type of this vpd packet.         */        if (packet->type == vpdType)            return (OK);        currentOffset += packet->size + 2;        } while ((currentOffset < VPD_EEPROM_SIZE) &&                  (packet->type != VPD_PID_TERM));    return (ERROR);    }/******************************************************************************** sysVpdPktInit - initialize a vital product data structure.** This routine reads the vital product data header from a serial eeprom and* validates it. If the header is valid, the remainder of the vpd data* is read from the serial eeprom and parsed into vpd packets for general* purpose use.  If the board type is LoPEC, the packets are read one* packet at a time rather than the whole 256 bytes.** RETURNS: OK, if successful or ERROR if unsuccessful.** SEE ALSO: sysVpdPktParse(), sysVpdPktGet() */STATUS sysVpdPktInit    (    UCHAR         devAdrs,   /* i2c address of the serial eeprom */    UCHAR         devOffset, /* offset to vpd within the serial eeprom */    VPD *         pVpd,      /* address of vpd structure */    VPD_PACKET ** pVpdPtr,   /* address of packet ptr array */    UINT32        PktLimit,  /* number of entries in the packet ptr array */    UINT32        parseFlag  /* flag indicating to read all bytes or not */    )    {    UINT32        currentOffset;    UCHAR *       currentPacketOffset;    UCHAR         size;    /* mark vpd packet pointer contents invalid. */    *pVpdPtr = NULL;    /* read just the header from serial eeprom. */    if (I2C_BYTE_RANGE_READ (devAdrs, devOffset, sizeof(VPD_HEADER),                        (UCHAR *)pVpd) != OK)        return (ERROR);    /* check for a valid header */    if (sysVpdHdrVld (pVpd) != OK)         return (ERROR);    if (!parseFlag)        return (OK);    /* read the rest of the vpd from the serial eeprom. */    currentOffset = 0;    currentPacketOffset = (UCHAR *)&pVpd->packets[0];    do        {        /* Read next packet type. */        if (I2C_BYTE_READ (devAdrs,                      devOffset + sizeof(VPD_HEADER) + currentOffset++,                      currentPacketOffset) != OK)            return (ERROR);        if ((*currentPacketOffset == VPD_PID_TERM) ||            (*currentPacketOffset == VPD_PID_GI))            break;         currentPacketOffset++;        /* Read the packet size. */        if (I2C_BYTE_READ (devAdrs,                      devOffset + sizeof(VPD_HEADER) + currentOffset++,                      &size) != OK)            return (ERROR);        *currentPacketOffset++ = size;        /* Read the next vpd packet.  Add the type and size to numBytes. */        if (I2C_BYTE_RANGE_READ (devAdrs,                      devOffset + sizeof(VPD_HEADER) + currentOffset,                      size, currentPacketOffset) != OK)            return (ERROR);        currentOffset += size; /* Add size to pointer */        currentPacketOffset += size;        } while (currentOffset < VPD_EEPROM_SIZE);     /* parse the raw vpd data into vpd packets. */    return (sysVpdPktParse (pVpd, pVpdPtr, PktLimit) );    }/******************************************************************************** sysCalcBusSpd - routine to calculate the speed of the 60x processor bus** This routine calculates the 60x processor bus frequency using the UART's* crystal and baud rate generator as a reference. The UART is configured* for 9600 baud, which produces a (9600 x 16) Hz frequency reference on the* UART's BAUDOUT pin, this signal is visible as bit 1 in the board status* register. The processor's bus frequency can be determined by noting the* number of elapsed "ticks" required for a given number of BAUDOUT edges and* applying for formula below. The constants are: 2 = number edge per period.* 16 = the baud rate to BAUDOUT multiplier. 4 = The processor's time base* registers are driven by a clock which is 1/4 the bus frequency.**.CS*          edges counted            elapsed ticks*  T =  ----------------------  =  --------------------*         2 * baud rate * 16        bus frequency / 4****         2 * baud rate * 16        bus frequency / 4*  F = ----------------------  = ----------------------*           edges counted           elapsed ticks***       2 * baud rate * 16 * ticks * 4*  F = ---------------------------------- = bus Frequency*               edges counted*.CE** To keep everything in 32 bits, the number of ticks must be below 3495. At* 100 MHz, 3495 time base ticks is only 140 uSecs or 43 BAUDOUT edges. At* these numbers, each time base tick is worth 29.25 KHz. By setting the number* of edges equal to the baud rate, (baud rate / edges counted) = 1 the * equation reduces to:**.CS* F = 2 * 16 * ticks * 4 = Bus Frequency.*.CE** Using this equation, the sampling interval is increased to about 31 mSecs,* each time base tick is only worth 128 Hz and there is no danger of overflowing* 32 bits.** RETURNS: The bus speed (in Hz).** NOTE: This routine must be called before interrupts are enabled and before* the serial port baud rate has been configured. Since it is usually called* very early in the start up sequence, this should not be a problem.*/#define BAUD_RATE           9600#define BAUD_RATE_CODE      12#define EDGES_PER_PERIOD    2	    /* one rising, one falling = 2 */#define BAUD_CLOCK_RATIO    16	    /* UART's BAUDOUT is 16x baud rate */#define TIME_BASE_RATIO     4	    /* time base clock is 1/4 bus frequency */#define MULTIPLIER (EDGES_PER_PERIOD * BAUD_CLOCK_RATIO * TIME_BASE_RATIO)UINT32 sysCalcBusSpd (void)    {    UCHAR * pUart = (UCHAR *) COM1_BASE_ADR;    UINT32 edgeTime;    /* configure the uart for 9600 baud */    pUart[UART_LCR * UART_REG_ADDR_INTERVAL] |= I8250_LCR_DLAB;    pUart[UART_BRDL * UART_REG_ADDR_INTERVAL] = BAUD_RATE_CODE;    pUart[UART_BRDH * UART_REG_ADDR_INTERVAL] = 0;    pUart[UART_LCR * UART_REG_ADDR_INTERVAL] &= ~I8250_LCR_DLAB;    EIEIO_SYNC;    edgeTime = sysTimeEdges (BAUD_RATE) * MULTIPLIER;    if (edgeTime == 0)	flashFailLed (TRUE, FAIL_LED_BAUDOUT, 4);    return (edgeTime);    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
蜜臀av国产精品久久久久| 91麻豆精品国产91久久久久久久久| 日韩精品一区二区三区四区| 蜜臀av在线播放一区二区三区 | 亚洲国产精品国自产拍av| 国产乱码精品一区二区三区五月婷| 久久蜜桃av一区二区天堂 | 国产精品超碰97尤物18| 99久久99久久精品免费看蜜桃| 亚洲男同性恋视频| 欧美视频中文字幕| 美女网站色91| 国产亚洲一区二区三区在线观看| 成人晚上爱看视频| 亚洲国产视频a| 日韩午夜在线影院| 成人性生交大合| 一区二区三区 在线观看视频| 欧美精品一级二级| 国产一区二区不卡| 亚洲人成精品久久久久久| 欧美人伦禁忌dvd放荡欲情| 麻豆91在线播放| 国产精品国产三级国产aⅴ无密码| 欧美午夜精品一区| 国产酒店精品激情| 亚洲国产综合色| 久久亚洲影视婷婷| 欧美视频日韩视频| 国产高清不卡二三区| 洋洋成人永久网站入口| 精品粉嫩超白一线天av| 色综合久久久网| 国产制服丝袜一区| 亚洲一区二区三区国产| 久久综合久久综合亚洲| 欧美性大战xxxxx久久久| 国产精品香蕉一区二区三区| 午夜天堂影视香蕉久久| 欧美精彩视频一区二区三区| 欧美日韩精品三区| 成人夜色视频网站在线观看| 蜜臀国产一区二区三区在线播放 | 国产91精品欧美| 日本欧美一区二区| 亚洲精品少妇30p| 久久久久高清精品| 日韩一区二区三区视频在线观看| 91色|porny| 国产精品一二三区在线| 奇米精品一区二区三区在线观看一| 成人免费一区二区三区在线观看| 精品国产一区二区三区久久影院| 欧美美女网站色| 99精品国产一区二区三区不卡| 国产一区在线精品| 久久精品国产精品亚洲综合| 亚洲不卡av一区二区三区| 综合分类小说区另类春色亚洲小说欧美 | 精品国产a毛片| 在线播放/欧美激情| 91国在线观看| 99久久伊人久久99| 成人中文字幕电影| 国产91富婆露脸刺激对白| 国产在线不卡一卡二卡三卡四卡| 日韩精品每日更新| 午夜电影网一区| 亚洲一二三四在线观看| 一区二区三区小说| 亚洲精选免费视频| 亚洲精品中文在线观看| 亚洲精选在线视频| 亚洲一区视频在线| 亚洲成人黄色小说| 亚洲成人动漫av| 午夜精彩视频在线观看不卡| 性久久久久久久| 日韩影视精彩在线| 青草av.久久免费一区| 奇米影视在线99精品| 美女视频黄 久久| 国产一区二区三区蝌蚪| 国产乱一区二区| 高清日韩电视剧大全免费| 懂色av一区二区三区蜜臀| 成人性色生活片免费看爆迷你毛片| 国产91精品一区二区麻豆网站| 成人黄色软件下载| 91福利视频久久久久| 337p亚洲精品色噜噜噜| 日韩欧美不卡在线观看视频| 久久久一区二区三区捆绑**| 国产精品视频一二三区| 日韩一区在线看| 亚洲国产成人高清精品| 日本91福利区| 国产福利电影一区二区三区| 91片黄在线观看| 欧美一区二区三区播放老司机| 精品嫩草影院久久| 国产精品成人免费| 视频一区国产视频| 国产麻豆一精品一av一免费| 粉嫩高潮美女一区二区三区| 91久久线看在观草草青青 | 欧美在线你懂的| 日韩精品专区在线| 国产精品视频看| 夜夜嗨av一区二区三区网页 | 欧美日韩国产电影| 久久这里只有精品首页| **网站欧美大片在线观看| 亚洲国产你懂的| 国产精品一区一区三区| 91成人免费在线| 精品成人一区二区三区| 又紧又大又爽精品一区二区| 琪琪久久久久日韩精品| 99精品久久只有精品| 日韩美女天天操| 亚洲女人的天堂| 激情五月播播久久久精品| 一本色道久久综合亚洲精品按摩| 日韩欧美资源站| 一区二区三区在线不卡| 国产精品亚洲成人| 日韩一区和二区| 亚洲一区二区av电影| 国产成人免费xxxxxxxx| 欧美二区乱c少妇| 亚洲免费三区一区二区| 国产在线麻豆精品观看| 欧美日韩美少妇| 亚洲精品乱码久久久久久久久 | 国产精品久久久久久久久免费桃花| 亚洲成人精品影院| 不卡在线视频中文字幕| 精品精品欲导航| 日日夜夜精品免费视频| 一本色道a无线码一区v| 中文字幕精品一区二区三区精品| 美女网站一区二区| 555www色欧美视频| 亚洲一区影音先锋| 94-欧美-setu| 国产精品久久久久久亚洲伦| 另类小说综合欧美亚洲| 欧美人牲a欧美精品| 亚洲综合视频在线| 色欧美片视频在线观看 | 欧美经典一区二区| 国产专区欧美精品| 久久综合99re88久久爱| 日本免费在线视频不卡一不卡二 | 日韩精品一区国产麻豆| 午夜婷婷国产麻豆精品| 欧美日韩一区二区在线观看 | 国产欧美一区在线| 国产精品白丝jk黑袜喷水| 日韩精品中文字幕一区二区三区| 蜜臀av一区二区在线观看| 欧美浪妇xxxx高跟鞋交| 亚洲自拍偷拍图区| 欧美色图一区二区三区| 亚洲精品美国一| 精品视频123区在线观看| 亚洲成人黄色影院| 777午夜精品视频在线播放| 日韩制服丝袜先锋影音| 欧美一级日韩不卡播放免费| 日韩国产一二三区| 日韩一区二区三区精品视频| 日韩av一区二| 日韩色视频在线观看| 国产真实乱对白精彩久久| 国产亚洲欧美一级| 波多野结衣视频一区| 亚洲色图一区二区| 欧美亚洲一区二区在线| 午夜精品福利在线| 欧美一区二区三区人| 精品一区精品二区高清| 久久精品一二三| 色综合久久天天综合网| 国产一区二区影院| 久久99久久久久| 精品一区二区三区视频| 99re视频精品| 亚洲最新视频在线观看| 欧美日韩精品一区二区三区四区 | 久久久亚洲午夜电影| 国产v综合v亚洲欧| 一区二区三区欧美久久| 日韩欧美视频在线| 国产自产高清不卡| 亚洲欧美日本在线| 欧美日韩精品一区二区三区| 激情成人午夜视频| 综合亚洲深深色噜噜狠狠网站|