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

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

?? sysmotvpdutil.c

?? This file contains board-specific information for the Motorola LoPEC in support of the lopec BSP. S
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/* sysMotVpdUtil.c - Vital Product Data Routines. *//* Copyright 1984-2002 Wind River Systems, Inc. *//* Copyright 1998-2002 Motorola, Inc., All Rights Reserved *//*modification history--------------------01e,22oct01,cak  Modified as per Wind River code review.01d,30mar01,scb  removed #ifdef DEBUG_VPD .. debugVpdProgram() .. #endif01c,04jan01,scb  sysCalcBusSpd() handles 0 baud-out when debug mode turned on.01b,08dec00,djs  changes for VPD and i2c support01a,02nov00,djs  created based on 01f,28may99,dmw mv2100*//*DESCRIPTIONThis file contains the Vital Product Data utility routines. These routines areused to read the contents of the VPD serial EEPROM and provide access to thevarious VPD data packets. These routines operate using caller-supplied buffers.This permits their use in environments where multiple VPD EEPROMS are supported(as in the Sitka).CAVEATSThis code executes very early in the startup sequence (called from romInit.s),before the image has been copied to RAM (assuming a non-ROM image). As such,this file must be added to the BOOT_EXTRA list in the Makefile to prevent itfrom being compressed during keernel generation. Additionally, extreme cautionmust be exercised when modifying these routines to prevent the use of absolutememory addresses which reference locations in the RAM-relocated image. Theselocations are invalid and references to them will cause unpredictable behavior.Absolute memory addresses are generated by the compiler when referencing tables,static data structures and global variables. All of these must be avoided. Insome places in the code, nested if-else constructs are used to avoid the jumptable created when a simple switch contruct is used. The jump table address wasloaded using an absolute address and the code broke because the execution imagehad not been copied to the RAM address produced by the compiler.*/#include "vxWorks.h"#include "config.h"#include "lopec.h"#include "sysMotVpd.h"#include "drv/sio/i8250Sio.h"/* defines */#define ENET_INSTANCE_SIZE  7   /* size of an extended ethernet packet */#ifndef I2C_BYTE_READIMPORT int i2cRead(UINT32, unsigned int , unsigned int , char *);#define I2C_BYTE_READ(devAddr, startBlk, pBuf) \    i2cRead(devAddr, startBlk, 1, pBuf)#endif#ifndef I2C_BYTE_WRITEIMPORT int i2cWrite (UINT32, unsigned int, unsigned int, char *);#define I2C_BYTE_WRITE(devAddr, startBlk, bfr) \    i2cWrite(devAddr, startBlk, 1, bfr)#endif#ifndef I2C_BYTE_RANGE_READ#define I2C_BYTE_RANGE_READ(devAddr, startBlk, count, pBuf) \    i2cRead(devAddr, startBlk, count, pBuf)#endif#ifndef I2C_BYTE_RANGE_WRITE#define I2C_BYTE_RANGE_WRITE(devAddr, startBlk, count, pBuf) \    i2cWrite(devAddr, startBlk, count, pBuf)#endif#define FAIL_LED_BAUDOUT    0x1     /* Failure code for no BAUD out  */IMPORT UINT32 sysTimeEdges (UINT32);IMPORT void   flashFailLed (BOOL, UINT32, int);UINT32 sysCalcBusSpd (void);/******************************************************************************** sysI2cSromRangeRead - reads a range of bytes from an I2C serial eeprom (SROM)** This routine simply calls the I2C byte read routine for each requested byte.* The I2C byte read call is written using a macro to accommodate alternate* read routines.** RETURNS: OK, or ERROR if the I2C byte read fails.** SEE ALSO: sysI2cSromRangeWrite**/STATUS sysI2cSromRangeRead     (    UCHAR    devAdrs,    /* i2c address of the serial eeprom */    UCHAR    devOffset,  /* starting offset within the serial eeprom to read */    UINT16   byteCount,  /* number of bytes to read (one-based) */    UCHAR *  pBfr        /* destination buffer */    )    {    for ( ; byteCount != 0; ++devOffset, ++pBfr, --byteCount)        {        if (I2C_BYTE_READ(devAdrs, devOffset, pBfr) != OK)            return (ERROR);        }    return (OK);    }/******************************************************************************** sysI2cSromRangeWrite - writes a range of bytes to an I2C serial eeprom (SROM)** This routine simply calls the I2C byte write routine for each requested byte.* The I2C byte write call is written using a macro to accommodate alternate* I2C byte write routines.** RETURNS: OK, or ERROR if the I2C byte write fails.** SEE ALSO: sysI2cSromRangeRead**/STATUS sysI2cSromRangeWrite     (    UCHAR    devAdrs,    /* i2c address of the serial eeprom */    UCHAR    devOffset,  /* starting offset within the serial eeprom to write */    UINT16   byteCount,  /* number of bytes to write (one-based) */    UCHAR *  pBfr        /* source buffer */    )    {    for ( ; byteCount != 0; ++devOffset, ++pBfr, --byteCount)        {        if (I2C_BYTE_WRITE(devAdrs, devOffset, pBfr) != OK)            return (ERROR);        }    return (OK);    }/******************************************************************************** sysVpdHdrVld - validate a vital product data header** This routine validates the header of a vital product data structure. The* validation is performed by checking the contents of the "eyecatcher" and size* fields.** RETURNS: OK, or ERROR if vpd header contents are invalid.**/STATUS sysVpdHdrVld     (    VPD * pVpd   /* pointer to vpd structure */    )    {    UINT32 * pEyecatcher;    /*     * verify that the contents of the eyecatcher are correct. this must be     * done numerically because the string addresses generated by the     * compiler reference the program data area which is not valid until after     * the code has been copied to ram.     */    pEyecatcher = (UINT32 *)&pVpd->header.eyeCatcher[0];    if ((*pEyecatcher != 0x4d4f544f) ||     /* MOTO */        (*(pEyecatcher+1) != 0x524f4c41))   /* ROLA */        {            return (ERROR);        }    /*     * make sure the eeprom contents will fit into our vpd structure     * and that the eeprom size is at least large enough to hold the header and     * a termination packet.     */    if ( (pVpd->header.size > sizeof(VPD)) ||         (pVpd->header.size < (sizeof(VPD_HEADER) + 1)) )        return (ERROR);    return (OK);    }/******************************************************************************** sysVpdPktParse - parse the vital product data packets** This routine parses a raw VPD data array into an array of VPD packet pointers.* The parser walks through the data area of the vital product data structure and* saves the starting address of each packet it finds into an array of packet* pointers. When a desired packet is needed at a later time, the packet pointer* array can be scanned without having to re-parse the packets for each search.** RETURNS: OK, or ERROR and NULLs the first pointer in the array if an error*          is encountered while parsing or the size of the pointer array is*          exceeded. ** SEE ALSO: sysVpdPktGet()*/STATUS sysVpdPktParse    (    VPD *         pVpd,        /* pointer to vpd structure */    VPD_PACKET ** pVpdPtr,     /* packet ptr array */    UINT32        vpdPktLimit  /* number of pointers in the array */    )    {    VPD_PACKET ** p;           /* address of first array element */    UCHAR type;                /* type of current packet */    UINT32 limit;              /* end of valid packet data */    UINT32 index = 0;          /* current position in packet data */    UINT32 pkt = 0;            /* number of packets found */    /* verify that the header is correct */    if (sysVpdHdrVld (pVpd) != OK)        {        *pVpdPtr = NULL;        return (ERROR);        }    /* save the address of the first element in the pointer array */    p = pVpdPtr;    /* calculate the size of the data array */    limit = (UINT32)pVpd->header.size - sizeof(VPD_HEADER);    /* walk through the vpd data area parsing each packet */    do        {        /* save the packet type */        type =  pVpd->packets[index];        /*         * save the address of the current packet in the packet pointer array         * and advance the packet pointer to the next array entry.         */        *pVpdPtr++ = (VPD_PACKET *)&pVpd->packets[index++];        /* increment the packet count and advance to the next packet */        ++pkt;        index += pVpd->packets[index];        index++;        /*         * check the packet type and bail out of the loop if: 1) the termination         * packet has been found, 2) the packet type is illegal, or 3) if we've         * reached or exceeded the end of the data array or the packet pointer         * array.         */        if ( (type == VPD_PID_TERM) ||             (type == VPD_PID_GI)   ||             (index >= limit)       ||             (pkt >= vpdPktLimit) )            break;        /* continue until termination packet is found */        } while (type != VPD_PID_TERM);     /*     * if we didn't stop due to finding a termination packet, invalidate the     * first entry in the pointer array and return an error indication.     */    if (type != VPD_PID_TERM)        {        *p = NULL;        return (ERROR);        }    else        return (OK);    }/******************************************************************************** sysVpdPktGet - search the vital product data for a specific packet** This routine searches the a caller-supplied array of vpd packet pointers* looking for the specified instance of a specific packet type. Instances are* numbered starting at 0.** NOTE: There are two types of ethernet address packets defined: The base type* has 6 data bytes and no trailing instance number. The alternate type contains* 6 bytes of ethernet address plus a trailing instance byte. Instances are* numbered starting at zero. This routine will handle both packet types. It will* also handle multiple instances of the other packet types (except only one* termination packet is allowed).

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜一区二区三区视频| 怡红院av一区二区三区| 色欧美日韩亚洲| 久久精品99国产精品日本| 亚洲男人天堂av网| 欧美精品一区视频| 欧美日韩极品在线观看一区| 国产成人aaa| 日韩经典一区二区| 亚洲私人黄色宅男| 国产亚洲成年网址在线观看| 欧美日韩精品系列| 91久久精品一区二区| 国产不卡视频在线播放| 免费观看久久久4p| 亚洲成精国产精品女| 亚洲欧美一区二区不卡| 国产女主播一区| 日韩欧美一区中文| 欧美日本在线播放| 欧美亚一区二区| 91丨九色porny丨蝌蚪| 国产91在线|亚洲| 国产永久精品大片wwwapp| 美女一区二区视频| 奇米亚洲午夜久久精品| 视频在线观看一区| 午夜免费欧美电影| 日韩高清中文字幕一区| 首页综合国产亚洲丝袜| 亚洲高清视频中文字幕| 悠悠色在线精品| 一区二区三区电影在线播| 国产精品传媒在线| 亚洲日本成人在线观看| 自拍偷拍欧美激情| 一区二区三区在线免费观看| 自拍偷在线精品自拍偷无码专区| 中文字幕日韩欧美一区二区三区| 国产精品久久影院| 亚洲欧美视频在线观看| 亚洲精品视频免费观看| 亚洲激情校园春色| 一区二区三区 在线观看视频| 亚洲免费在线看| 亚洲国产综合视频在线观看| 午夜精品福利一区二区三区av| 亚洲成人av电影| 美国十次综合导航| 国产美女主播视频一区| 国产揄拍国内精品对白| 床上的激情91.| 色婷婷综合视频在线观看| 在线视频国内一区二区| 欧美性生活久久| 91精品一区二区三区久久久久久| 精品欧美乱码久久久久久| 久久久av毛片精品| 亚洲日本丝袜连裤袜办公室| 亚洲成人免费电影| 精品午夜一区二区三区在线观看 | 国产喷白浆一区二区三区| 中文子幕无线码一区tr| 亚洲丝袜精品丝袜在线| 日韩精品一区第一页| 九九热在线视频观看这里只有精品| 国产精品一区二区不卡| 91麻豆国产在线观看| 7777精品伊人久久久大香线蕉的| 精品日韩99亚洲| 1000部国产精品成人观看| 丝袜诱惑亚洲看片| 国产精品18久久久久久久久久久久| 不卡视频一二三四| 欧美日韩一区二区在线观看| 久久婷婷一区二区三区| 亚洲精品伦理在线| 毛片av一区二区| 99精品欧美一区二区蜜桃免费 | 九九九精品视频| 北条麻妃一区二区三区| 91精品国产综合久久久蜜臀粉嫩| 久久综合av免费| 一区二区在线观看免费| 九九九精品视频| 日本韩国欧美三级| www日韩大片| 亚洲图片欧美一区| 成人av综合在线| 日韩午夜激情免费电影| 亚洲老司机在线| 国产一区二区电影| 7799精品视频| 亚洲最大成人综合| 国产成人精品亚洲日本在线桃色 | 成人av午夜影院| 日韩视频在线观看一区二区| 国产精品久久久久永久免费观看| 琪琪久久久久日韩精品| 不卡一区在线观看| 久久精品亚洲乱码伦伦中文 | 精品在线播放午夜| 欧美丝袜自拍制服另类| 中文字幕成人av| 激情久久五月天| 91精品国产一区二区三区蜜臀 | 婷婷综合五月天| 93久久精品日日躁夜夜躁欧美| 久久久久久久性| 青草av.久久免费一区| 欧美中文字幕一区二区三区亚洲| 国产精品日产欧美久久久久| 国内精品免费**视频| 欧美一区中文字幕| 亚洲国产精品久久一线不卡| 99久久777色| 国产精品色在线| 国产精品一级黄| 2020国产精品| 九九精品视频在线看| 欧美大度的电影原声| 日韩综合小视频| 在线不卡免费av| 亚洲成a人片在线不卡一二三区| 色av一区二区| 悠悠色在线精品| 欧美丝袜丝交足nylons图片| 一区二区在线免费观看| 色综合天天综合色综合av| 成人欧美一区二区三区小说| jlzzjlzz亚洲女人18| 国产精品美女久久久久高潮| 风间由美性色一区二区三区| 国产女人aaa级久久久级| 粉嫩蜜臀av国产精品网站| 国产日韩欧美a| 本田岬高潮一区二区三区| 亚洲婷婷在线视频| 91电影在线观看| 午夜精品久久久久久久99樱桃 | 亚洲人成网站精品片在线观看| 不卡视频在线观看| 亚洲免费在线观看| 欧美日韩一区二区三区视频| 日韩制服丝袜av| 精品裸体舞一区二区三区| 精品一区二区三区在线观看| 久久久影视传媒| 波多野结衣欧美| 亚洲一二三四在线观看| 欧美视频一区二区在线观看| 日韩精品视频网| 久久人人爽人人爽| 99久久婷婷国产综合精品电影| ...av二区三区久久精品| 欧美日韩久久久| 久久精品久久久精品美女| 国产婷婷色一区二区三区在线| 成人国产精品免费观看| 亚洲一区二区在线免费观看视频| 欧美日韩国产高清一区| 精品一区在线看| 亚洲乱码日产精品bd| 911精品国产一区二区在线| 国产一区二区看久久| 亚洲视频免费在线观看| 91麻豆精品国产91久久久使用方法| 久久99久久久久| 国产精品久久久久婷婷二区次| 欧美亚洲综合一区| 国产一区二区免费看| 亚洲综合久久久| 精品少妇一区二区三区免费观看| 成人国产精品免费观看| 日产欧产美韩系列久久99| 国产精品日日摸夜夜摸av| 欧美片网站yy| 福利一区在线观看| 奇米色777欧美一区二区| 欧美国产精品专区| 91精品麻豆日日躁夜夜躁| 岛国av在线一区| 日韩av中文字幕一区二区| 中文字幕第一区二区| 日韩一区二区在线看片| 97久久久精品综合88久久| 久久 天天综合| 亚洲午夜在线观看视频在线| 久久女同互慰一区二区三区| 欧美日韩美女一区二区| 99精品国产99久久久久久白柏| 久久精品二区亚洲w码| 亚洲综合视频在线观看| 日本一区二区三区四区在线视频| 欧美日韩夫妻久久| 色婷婷综合久久久久中文一区二区| 国产一区在线视频| 免费国产亚洲视频| 亚洲一区精品在线| 亚洲日韩欧美一区二区在线|