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

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

?? lan91c96.c

?? Intel XScale PXA255 引導(dǎo)Linux的Redboot 版bootloader源代碼!
?? C
?? 第 1 頁 / 共 5 頁
字號(hào):
            data = ReadWord(&ioRegsP[LAN91C96_DATA_HIGH]);            // Save the data.                             *dataP++ = data;        }        // Now check the status word for an odd byte in the data packet.        if (statusWord & LAN91C96_ODD_FRM)        {            // Now read the Control word to get the last data byte.            controlWord = ReadWord(&ioRegsP[LAN91C96_DATA_HIGH]);            // Store the last byte.            *dataP = (UCHAR)controlWord;            // Update the receive count.                        count += 1;        }        // Now deallocate the page.        DeallocateRxPacket(ctxP);        // Check for errors.        if (statusWord & LAN91C96_TOO_SHORT)        {            /*LOGERROR(ctxP->loggedError, ERR_L_LAN91C96,                     ERR_LAN91C96_RECEIVE, ERR_T_WRONG_STATE, statusWord, 0, 0);*/            //printf("LAN91C96: rx error frame too short\n");        }        if (statusWord & LAN91C96_TOO_LONG)        {            //printf("LAN91C96: rx error frame too long\n");        }        if (statusWord & LAN91C96_BAD_CRC)        {            //printf("LAN91C96: rx error bad CRC\n");        }        if (statusWord & LAN91C96_ALGN_ERR)        {            //printf("LAN91C96: rx error, alignment error\n");        }        // Check dump flag.        if (ctxP->dumpFlag)        {            if (statusWord & LAN91C96_BROD_CAST)            {                //printf("LAN91C96: rx broadcast\n");            }        }        // Check dump flag.        if (ctxP->dumpFlag)        {            // Display received frame.            /*DM_Printf("Receive Packet:");*/            LAN91C96DumpFrame(ctxP, 0, (PUCHAR)bufferP, count - CRC_LEN);        }        // Return the receive count.        *rxCountP = count - CRC_LEN;    }    // Get delta time reference.    GetDeltaTimeStamp(ctxP, "Rx");    return (0);}/********************************************************************************** FUNCTION:*    LAN91C96HWSetup** DESCRIPTION:*    Initialize the LAN91C96 and set the MAC address.** INPUT PARAMETERS:*    LAN91C96_ContextT *ctxP - Pointer to the LAN91C96 Device Context Structure*    BOOL resetFlag - Reset the LAN91C96 even if previously setup.** RETURNS:*    0 - Success*    non-zero - Error** GLOBAL EFFECTS:*    Sets up the initial state of the LAN91C96 Ethernet controller.** ASSUMPTIONS:*    None.** CALLS:*    WriteByte - To write a byte to either the attribute or I/O space.*    WriteWord - To write a word to either the attribute or I/O space.*    ReadByte - Read a byte from either the attribute or I/O space.*    ReadWord - Read a word from either the attribute or I/O space.*    WriteEEPROM - Write the word into the specified location within the EEPROM.*    ReadEEPROM - Read the work from the specified location within the EEPROM.** CALLED BY:*    Application or test code.** PROTOTYPE:*    UINT LAN91C96HWSetup(LAN91C96_ContextT *ctxP, BOOL resetFlag);*********************************************************************************/UINT LAN91C96HWSetup(LAN91C96_ContextT *ctxP, BOOL resetFlag){    PVUINT32 ioRegsP = ctxP->LAN91C96IoP;     // Get pointer to I/O space    PVUINT32 attRegsP = ctxP->LAN91C96AttP;   // Get pointer to attribute space    volatile UINT32 lanReg;                            // Copy of LAN91C96 register    volatile UINT16 MACAddress[3];                     // Used to check the MAC address    volatile UINT16 CfgReg;                            // Contents of Config Register    UINT16 frameHandle = 0;                   // Page number of allocated frame    volatile UINT32 randomNumber, i;    char     tempChar ;    // Check if we should override the default and do a hard reset.    if (resetFlag)    {        // Clear the setup flag and do a hard reset.        ctxP->setupFlag = FALSE;    }    // Check if we've already reset the LAN91C96    if (ctxP->setupFlag)    {        // Already setup, just return.        return (0);    }    // When an EEPROM acess is in progress the STORE and RELOAD bits will be    // read back as high. The remaining 14 bits of this register will be    // invalid. During this time, attempted read/write operations, other than    // polling the EEPROM status, will NOT have any effect on the internal    // registers. The CPU can resume accessess to the LAN91C96 after both bits    // are low. A worst case RELOAD operation initiated by RESET or by software    // takes less than 750 us in either mode.    //    // SRESET: This bit when set will clear all internal registers    // associated with the Ethernet function except itself and it will also    // lower the nIREQ/READY pin. When this bit is cleared, nIREQ/READY pin    // will be raised.    //    // Enable Function: This bit enables (1) or disables (0) the Ethernet    // function. While the Ethernet function is disabled it remains in power    // down mode, no access to the Ethernet I/O space (i.e. The bank register    // are not accessible) is allowed. IREQ is not generated for this function    // and INPACK* is not returned for accessess to the Ethernet registers.    //    // Note: Magic packet bit setting is ignored if the function is disabled.    // Access the attribute space to set the SRESET bit to reset the LAN91C96    lanReg = ReadByte(&attRegsP[LAN91C96_ECOR]);    lanReg |= LAN91C96_ECOR_SRESET;    WriteByte(lanReg, &attRegsP[LAN91C96_ECOR]);    hal_delay_us(750) ;    // Access the attribute space to enable the LAN91C96.    // First clear the SRESET bit.    lanReg = ReadByte(&attRegsP[LAN91C96_ECOR]);    lanReg &= ~LAN91C96_ECOR_SRESET;    WriteByte(lanReg, &attRegsP[LAN91C96_ECOR]);    hal_delay_us(750);    // Now set the Enable Function bit.    lanReg = ReadByte(&attRegsP[LAN91C96_ECOR]);    lanReg |= LAN91C96_ECOR_ENABLE;    WriteByte(lanReg, &attRegsP[LAN91C96_ECOR]);    hal_delay_us(750);    // Force byte mode (not required)    lanReg = ReadByte(&attRegsP[LAN91C96_ECSR]);    lanReg |= LAN91C96_ECSR_IOIS8;    WriteByte(lanReg, &attRegsP[LAN91C96_ECSR]);    hal_delay_us(750) ;    lanReg = ReadWord(&ioRegsP[LAN91C96_BANK_SELECT]) ;    if((lanReg & 0xFF00) != 0x3300)    {        printf("LAN91C96: Unable to detect device - upper 8 bits = %x\n", lanReg);        return (-1);    }    // Read the MAC address from the 91C96. This gets read from the EEPROM    // by the 91C96 during reset. This assumes Bank 1 is selected.    /* Need to copy the MAC address into the ioRegs space in a different order       than which it is stored in EEPROM.  It is stored in EEPROM with the most       significant octet in the highest memory location octet and down from       there.  So what I need to so is read EEPROM_MAC_OFSSET_3 amd store the       uooer 8 bits in the first 8 bits of &ioRegs[LAN91C96_IA0], and ...*/    WriteByte(BANK1, &ioRegsP[LAN91C96_BANK_SELECT]);/*    MACAddress[0] = ReadWord(&ioRegsP[LAN91C96_IA0]);    MACAddress[1] = ReadWord(&ioRegsP[LAN91C96_IA2]);    MACAddress[2] = ReadWord(&ioRegsP[LAN91C96_IA4]);*/    	/*    MACAddress[0] = ReadEEPROM(ctxP, EEPROM_MAC_OFFSET_1);    MACAddress[1] = ReadEEPROM(ctxP, EEPROM_MAC_OFFSET_2);    MACAddress[2] = ReadEEPROM(ctxP, EEPROM_MAC_OFFSET_3);	*/    MACAddress[0] = ReadWord(&ioRegsP[LAN91C96_IA0]);    MACAddress[1] = ReadWord(&ioRegsP[LAN91C96_IA2]);    MACAddress[2] = ReadWord(&ioRegsP[LAN91C96_IA4]);    // Convert the MAC address to ASCII so it prints out consistently    printf("LAN91C96: The current MAC address is ") ;    for(i=0;i<3;i++)    {      tempChar = (char)(0x30 + (MACAddress[i]>>4 & 0x000F)) ;      if((short)tempChar>0x39)      {          (short)tempChar = (short)tempChar + 7 ;      }		  printf("%c", tempChar) ;      tempChar = (char)(0x30 + (MACAddress[i]>>0 & 0x000F)) ;      if((short)tempChar>0x39)      {          (short)tempChar = (short)tempChar + 7 ;      }      printf("%c", tempChar) ;      printf("%c", ' ') ;      tempChar = (char)(0x30 + (MACAddress[i]>>12 & 0x000F)) ;      if((short)tempChar>0x39)      {          (short)tempChar = (short)tempChar + 7 ;      }      printf("%c", tempChar) ;      tempChar = (char)(0x30 + (MACAddress[i]>>8 & 0x000F)) ;      if((short)tempChar>0x39)      {          (short)tempChar = (short)tempChar + 7 ;      }      printf("%c", tempChar) ;            printf("%c", ' ') ;      }    printf("\n") ;		// copy the MAC address to the configuration structure		ctxP->MACAddress[0] = MACAddress[0] ;		ctxP->MACAddress[1] = MACAddress[1] ;		ctxP->MACAddress[2] = MACAddress[2] ;    // Read the Configuration Register. This assumes Bank 1 is selected.    ctxP->configRegister = ReadWord(&ioRegsP[LAN91C96_CONFIG]);    // Read the Base Address Register.    // Access the I/O space to select Bank 3 and read the IOS bits.    WriteByte(BANK3, &ioRegsP[LAN91C96_BANK_SELECT]);    ctxP->switches = ReadWord(&ioRegsP[LAN91C96_MGMT]);    // Read the LAN91C96 revision. This assumes Bank 3 is selected.    ctxP->revision = ReadWord(&ioRegsP[LAN91C96_REVISION]);    // Give the LAN91C96 time to settle down.    hal_delay_us(750) ;    // Set the SQUELCH bit - this changes the threshold for a valid signal    //  from 300mV to 180mV. This is to attempt to fix problems we have seen    // with some (usually 8 port) hubs.    // Select Bank 1    WriteByte(BANK1, &ioRegsP[LAN91C96_BANK_SELECT]);    // Set the squelch and no wait bits.    CfgReg = ReadWord(&ioRegsP[LAN91C96_CONFIG]);    CfgReg |= (LAN91C96_CR_SET_SQLCH | LAN91C96_CR_NO_WAIT);        CfgReg &= ~(LAN91C96_CR_AUI_SELECT | LAN91C96_CR_INT_SEL0 | LAN91C96_CR_DIS_LINK);    WriteWord(CfgReg, &ioRegsP[LAN91C96_CONFIG]);    // Initialize the Control Register - set Transmit Enable and Auto Release.    // Bit 8 is always set? This assumes Bank 1 is selected.    WriteWord((LAN91C96_CTR_TE_ENABLE |               LAN91C96_CTR_BIT_8     |               LAN91C96_CTR_AUTO_RELEASE), &ioRegsP[LAN91C96_CONTROL]);    // Select Bank 0    WriteByte(BANK0, &ioRegsP[LAN91C96_BANK_SELECT]);    // Initialize the Memory Configuration Register. See page 49 of the    // LAN91C96 data sheet for details. We reserve enough memory for one    // maximum sized transmit frame. This will prevent deadlock conditions    // if we receive multiple frames that can't be handled because of the    // lack of memory. The amount of memory reserved for transmit is calculated    // as LAN91C96_MCR_TRANSMIT_PAGES * 256 * M, where M is 1 for the 91C96.    // For a 1500 byte frame, we'll need 1500 / 256 = 6 memory pages.    WriteWord(LAN91C96_MCR_TRANSMIT_PAGES, &ioRegsP[LAN91C96_MCR]);    // Initialize the Transmit Control Register - Set the Transmit enable and    // Pad bit, which will pad transmit packets less than 64 bytes with zeroes.    // This assumes Bank 0 is selected.    WriteWord((LAN91C96_TCR_TXENA | LAN91C96_TCR_PAD_EN),               &ioRegsP[LAN91C96_TCR]);    // Select Bank 2    WriteByte(BANK2, &ioRegsP[LAN91C96_BANK_SELECT]);    // Disable all interrupts.    WriteByte(0, &ioRegsP[LAN91C96_INT_MASK]);    // Select Bank 0    WriteByte(BANK0, &ioRegsP[LAN91C96_BANK_SELECT]);    // The receive register should be the last thing initialized to avoid    // receiving packets before we're ready. Now set the Receive Enable bit.    WriteWord((LAN91C96_RCR_RXEN | LAN91C96_RCR_ALMUL | LAN91C96_RCR_PRMS), &ioRegsP[LAN91C96_RCR]);    // Select Bank 2    WriteByte(BANK2, &ioRegsP[LAN91C96_BANK_SELECT]);    // Now perform a quick test to determine if the LAN91C96 is working.    // Allocate a transmit frame from the LAN91C96.    if (AllocateTxPacket(ctxP, ETHERNET_MAX_LENGTH, &frameHandle))    {      printf("In LAN91C96HWSetup - AllocateTxPacket failed\n") ;      return (ctxP->loggedError);    }    // Now deallocate the page.    if (DeallocateTxPacket(ctxP))    {      printf("In LAN91C96HWSetup - DeallocateTxPacket failed\n") ;      return (ctxP->loggedError);    }    // Set setup flag.    ctxP->setupFlag = TRUE;		LAN91C96LoopBack(ctxP, 0) ;    // Let the LAN91C96 settle before attempting the first transmit.	hal_delay_us(LAN91C96_TIME_DELAY) ;	return (0);}/********************************************************************************** FUNCTION:*    LAN91C96HWShutdown** DESCRIPTION:*    This routine disables the LAN91C96 and turns it off.** INPUT PARAMETERS:*    LAN91C96_ContextT *ctxP - Pointer to the LAN91C96 Device Context Structure** RETURNS:*    None.** GLOBAL EFFECTS:*    Disables the LAN91C96 from transmitting or receiving packets from the*    Ethernet.** ASSUMPTIONS:*    None.** CALLS:*    None.** CALLED BY:*    None.** PROTOTYPE:*   VOID LAN91C96HWShutdown(LAN91C96_ContextT *ctxP);*********************************************************************************/VOID LAN91C96HWShutdown(LAN91C96_ContextT *ctxP){    PVUINT32 attRegsP = ctxP->LAN91C96AttP;   // Get pointer to attribute space    UINT16 lanReg;                            // Copy of LAN91C96 register    // SRESET: This bit when set will clear all internal registers    // associated with the Ethernet function except itself and it will also    // lower the nIREQ/READY pin. When this bit is cleared, nIREQ/READY pin    // will be raised.    // Access the attribute space to set the SRESET bit to reset the LAN91C96.    lanReg = ReadByte(&attRegsP[LAN91C96_ECOR]);    lanReg |= LAN91C96_ECOR_SRESET;    WriteByte(lanReg, &attRegsP[LAN91C96_ECOR]);    hal_delay_us(750) ;//DM_WaitUs(750);    // Save the default interrupt mask.    ctxP->intMask = LAN91C96_MSK_RCV_INT;    // Clear setup flag.    ctxP->setupFlag = FALSE;    // Zero the MAC address.    memset(&ctxP->MACAddress[0], 0, sizeof(ctxP->MACAddress));    // Clear ramdom MAC flag.    ctxP->randomMACFlag = 0;}/********************************************************************************** FUNCTION:*    LAN91C96SetMACAddress** DESCRIPTION:*    This routine will set the specified MAC address.** INPUT PARAMETERS:*    LAN91C96_ContextT *ctxP - Pointer to the LAN91C96 Device Context Structure*    PUCHAR MACP - Pointer to the MAC address.*    UINT randomFlag = 0 = MAC address supplied, 1 = generate a MAC address.** RETURNS:*    0 - Success*    non-zero - Error** GLOBAL EFFECTS:*    The LAN91C96 MAC address is changed.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品视频在线免费| 日韩欧美成人一区二区| 精品夜夜嗨av一区二区三区| 中文字幕在线不卡国产视频| 制服丝袜亚洲播放| 色综合天天综合网天天狠天天| 另类中文字幕网| 亚洲一区二区三区在线| 久久色在线视频| 91.com视频| 91精品办公室少妇高潮对白| 国产suv精品一区二区三区| 日本在线不卡视频一二三区| 亚洲精品国久久99热| 国产精品三级av在线播放| 日韩欧美一区电影| 欧美疯狂做受xxxx富婆| 91成人网在线| 91影院在线观看| 国产成a人无v码亚洲福利| 精品一二三四在线| 日韩成人一区二区三区在线观看| 一级特黄大欧美久久久| 日韩美女久久久| 国产精品欧美久久久久一区二区| 精品国产乱码久久久久久蜜臀| 欧美一级在线视频| 欧美日韩精品一二三区| 欧美无砖专区一中文字| 91高清视频在线| 91久久一区二区| 91精品1区2区| 欧美日韩久久久| 9191国产精品| 日韩亚洲欧美在线观看| 日韩视频在线一区二区| 日韩一级大片在线观看| 欧美电影免费观看高清完整版在| 欧美一区二区视频观看视频| 欧美一级片在线观看| 欧美一区二区视频在线观看 | 日韩电影免费一区| 午夜欧美视频在线观看| 日韩电影网1区2区| 久久福利视频一区二区| 国产精品亚洲а∨天堂免在线| 国产成人小视频| av中文字幕亚洲| 色94色欧美sute亚洲线路一ni| 欧美伊人久久大香线蕉综合69| 欧美日韩一区二区三区四区五区| 欧美日韩成人一区二区| 欧美一区二区三区在线电影| 精品久久一区二区三区| 欧美经典三级视频一区二区三区| 亚洲欧美中日韩| 亚洲乱码国产乱码精品精小说| 亚洲资源中文字幕| 青青青爽久久午夜综合久久午夜| 麻豆精品一区二区av白丝在线| 国精产品一区一区三区mba视频 | kk眼镜猥琐国模调教系列一区二区 | 亚洲已满18点击进入久久| 亚洲国产精品久久艾草纯爱 | 国产成+人+日韩+欧美+亚洲| 94色蜜桃网一区二区三区| 欧美怡红院视频| 欧美成人在线直播| 国产精品久久久久影院亚瑟| 亚洲自拍偷拍综合| 激情欧美一区二区| 国产.欧美.日韩| 欧美午夜不卡在线观看免费| 精品日韩99亚洲| 亚洲三级在线观看| 免费在线观看视频一区| 成人激情图片网| 欧美人与z0zoxxxx视频| 国产香蕉久久精品综合网| 亚洲精品乱码久久久久久| 美国十次了思思久久精品导航| 成人黄色777网| 91精品国产91综合久久蜜臀| 国产精品水嫩水嫩| 日本欧美一区二区| aaa欧美色吧激情视频| 91精品国产综合久久久久久久久久 | 91电影在线观看| 久久久噜噜噜久久中文字幕色伊伊 | 国产精品久久久久桃色tv| 丝袜亚洲另类欧美综合| 99久久久久免费精品国产| 日韩女优制服丝袜电影| 亚洲午夜三级在线| 国产98色在线|日韩| 91精品国产91综合久久蜜臀| 亚洲美女视频在线观看| 高清shemale亚洲人妖| 日韩色视频在线观看| 亚洲一二三区在线观看| www.日本不卡| 久久久久97国产精华液好用吗| 午夜电影一区二区三区| 91浏览器在线视频| 国产精品欧美久久久久无广告| 另类小说一区二区三区| 欧美群妇大交群中文字幕| 亚洲精品乱码久久久久久黑人 | 蜜臀久久99精品久久久画质超高清 | 免费视频最近日韩| 欧美又粗又大又爽| 亚洲三级小视频| 成人天堂资源www在线| 欧美videofree性高清杂交| 午夜精品在线看| 欧美影片第一页| 亚洲精品一二三四区| 99re在线视频这里只有精品| 久久久久久久精| 精品一区二区免费在线观看| 欧美一区永久视频免费观看| 性久久久久久久久| 欧美性大战久久| 一区二区三区蜜桃| 在线免费视频一区二区| 亚洲免费av网站| 一本大道久久a久久精品综合| 香港成人在线视频| 欧美在线免费播放| 亚洲一区二区三区四区五区黄| 色欧美乱欧美15图片| 亚洲欧美另类久久久精品2019| 91尤物视频在线观看| 亚洲激情欧美激情| 欧美午夜在线一二页| 亚洲国产欧美另类丝袜| 欧美三级三级三级| 五月激情六月综合| 欧美一区二区视频在线观看2022| 日本免费在线视频不卡一不卡二| 7777精品伊人久久久大香线蕉 | 99久久伊人网影院| ...av二区三区久久精品| 99re视频精品| 一区二区三区日韩欧美精品| 欧美最新大片在线看| 偷拍一区二区三区四区| 日韩免费视频一区| 国产精品一区二区果冻传媒| 亚洲国产精品激情在线观看| va亚洲va日韩不卡在线观看| 亚洲人成网站色在线观看| 欧美日韩综合不卡| 欧美96一区二区免费视频| 精品乱人伦一区二区三区| 高清成人在线观看| 一区二区三区蜜桃| 日韩一区二区免费视频| 国产成人日日夜夜| 亚洲精品第1页| 欧美一区二区福利在线| 高清日韩电视剧大全免费| 亚洲色图色小说| 欧美精选一区二区| 国产乱码精品一区二区三区av| 亚洲欧洲国产日韩| 欧美日韩极品在线观看一区| 国产一区欧美日韩| 亚洲美女视频一区| 91精品国产欧美日韩| 成人午夜电影小说| 亚洲成人综合视频| 国产午夜亚洲精品理论片色戒| 91蝌蚪国产九色| 秋霞影院一区二区| 国产精品无人区| 777色狠狠一区二区三区| 国产不卡视频在线播放| 午夜精品123| 中文字幕日韩一区| 精品国产欧美一区二区| 在线观看日韩毛片| 国产一区二区不卡| 亚洲成人免费电影| 欧美韩国一区二区| 91精品国产麻豆国产自产在线| 99久久精品免费看国产| 麻豆精品国产传媒mv男同| 一区二区三区在线观看欧美| 久久综合九色综合97婷婷女人| 欧美网站一区二区| 成人av影院在线| 蜜桃精品在线观看| 亚洲国产成人porn| 日韩一区在线看| 久久久久久久久蜜桃| 欧美一级久久久| 欧美四级电影在线观看| 99久久综合狠狠综合久久| 国产麻豆视频一区|