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

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

?? lan91c96.c

?? Intel XScale PXA255 引導Linux的Redboot 版bootloader源代碼!
?? C
?? 第 1 頁 / 共 5 頁
字號:
            // Parse the transmit error bits.            //DisplayTxStatus(ctxP);            // Cleanup after the transmit error.            if (DeallocateTxPacket(ctxP))            {                return (ctxP->loggedError);            }            /*LOGERROR(ctxP->loggedError, ERR_L_LAN91C96, ERR_LAN91C96_TRANSMIT,                     ERR_T_TIMEOUT, intStatus, 0, 0);*/            /*DM_Printf("LAN91C96: Transmit timeout, ISR = %x", intStatus);*/						ctxP->packetSent = 1 ;						//printf("LAN91C96: Transmit FIFO not empty\n");            return (-1);        }    }    // Now check for transmit complete.    if (intStatus & LAN91C96_IST_TX_EMPTY_INT)    {        // Acknowledge Transmit Empty Interrupt.				//printf("Transmit was complete and successful\n") ;        WriteByte(LAN91C96_ACK_TX_EMPTY_INT, &ioRegsP[LAN91C96_INT_ACK]);    }    // Now check for transmit complete.    if (intStatus & LAN91C96_IST_TX_INT)    {        // Acknowledge the Transmit interrupt.				//printf("Transmit may have had erors\n") ;        WriteByte(LAN91C96_ACK_TX_INT, &ioRegsP[LAN91C96_INT_ACK]);    }    // Clear the collision count.    WriteWord(BANK0, &ioRegsP[LAN91C96_BANK_SELECT]);    ReadWord(&ioRegsP[LAN91C96_COUNTER]);    resultCode = ReadWord(&ioRegsP[LAN91C96_EPH_STATUS]);    // Get delta time reference.    GetDeltaTimeStamp(ctxP, "Tx");		ctxP->packetSent = 1 ;    return (ctxP->loggedError);}/********************************************************************************** FUNCTION:*    LAN91C96_Handler** DESCRIPTION:*    This routine handles the operations normally performed by an Interrupt*    Service Routine. Since we aren't using interrupts to drive transmit and*    receive, this routine is used in place of the ISR routine.** INPUT PARAMETERS:*    LAN91C96_ContextT *ctxP - Pointer to the LAN91C96 Device Context Structure** RETURNS:*    None** GLOBAL EFFECTS:*    The rxFlag in the DCS is set if a packet has been received.** ASSUMPTIONS:*    None.** CALLS:*    None.** CALLED BY:*    LAN91C96ReceivePacket - ** PROTOTYPE:*    static*    VOID LAN91C96_Handler(LAN91C96_ContextT *ctxP));*********************************************************************************/staticVOID LAN91C96_Handler(LAN91C96_ContextT *ctxP){    PVUINT32 ioRegsP = ctxP->LAN91C96IoP;     // Get pointer to I/O space    UCHAR intStatus, maskRegister;    UINT16 bankSelect;    // Save the current bank selection and switch to Bank 2.    bankSelect = ReadWord(&ioRegsP[LAN91C96_BANK_SELECT]);    // Select Bank 2    WriteByte(BANK2, &ioRegsP[LAN91C96_BANK_SELECT]);    // Get the Interrupt Status Register.    intStatus = ReadByte(&ioRegsP[LAN91C96_INT_STATS]);    // Get the Interrupt Mask Register.    maskRegister = ReadByte(&ioRegsP[LAN91C96_INT_MASK]);    // Disable interrupts.    WriteByte(0, &ioRegsP[LAN91C96_INT_MASK]);    // Check for receive overrun errors    if (intStatus & LAN91C96_IST_RX_OVRN_INT)    {        // Acknowledge the Receive Overrun interrupt.        WriteByte(LAN91C96_ACK_RX_OVRN_INT, &ioRegsP[LAN91C96_INT_ACK]);        /*LOGERROR(ctxP->loggedError, ERR_L_LAN91C96, ERR_LAN91C96_RECEIVE,                 ERR_T_NORECEIVE, intStatus, 0, 0);*///printf("LAN91C96: Receive overrun error, %x", intStatus);    }    // Check for receive interrupt.    if (intStatus & LAN91C96_IST_RCV_INT)    {        // Set the flag indicating a frame has been received.        ctxP->rxFlag = 1;        // Clear the Receive Interrupt bit mask.        maskRegister &= ~LAN91C96_MSK_RCV_INT;    }    // Update the Interrupt Mask Register.    WriteByte(maskRegister, &ioRegsP[LAN91C96_INT_MASK]);    // Restore the bank select register.    WriteByte(bankSelect, &ioRegsP[LAN91C96_BANK_SELECT]);	return ;}/********************************************************************************** FUNCTION:*    DeallocateRxPacket** DESCRIPTION:*    This routine will deallocate a receive buffer and clear any errors.** INPUT PARAMETERS:*    LAN91C96_ContextT *ctxP - Pointer to the LAN91C96 Device Context Structure** RETURNS:*    0 - Success*    non-zero - Error** GLOBAL EFFECTS:*    The receive buffer is returned to the LAN91C96.** ASSUMPTIONS:*    None.** CALLS:*    None.** CALLED BY:*    LAN91C96ReceivePacket - Receive a frame from the LAN91C96.** PROTOTYPE:*    static*    VOID DeallocateRxPacket(LAN91C96_ContextT *ctxP);*********************************************************************************/INT DeallocateRxPacket(LAN91C96_ContextT *ctxP){    PVUINT32 ioRegsP = ctxP->LAN91C96IoP;     // Get pointer to I/O space    UINT start, currTimerValue ;    UINT timeout = (UINT)((LAN91C96_TO_ALLOC * 3686400) >> 20) ;    UCHAR intStatus, maskRegister;    // Select Bank 2    WriteByte(BANK2, &ioRegsP[LAN91C96_BANK_SELECT]);    // Release the memory from the received Frame.    WriteWord(LAN91C96_MMUCR_RELEASE_RX, &ioRegsP[LAN91C96_MMU]);    // Prepare for timeout by getting the initial time interval.    hal_clock_read(&start) ;//ostCtxP->getTimer_fnp(ostCtxP);    while (ReadWord(&ioRegsP[LAN91C96_MMU]) & LAN91C96_MMUCR_NO_BUSY)    {        // Get the current time interval.				hal_clock_read(&currTimerValue) ;        if (hal_elapsed_ticks((unsigned long *)&start) > timeout)        {            // Report timeout error.            /*LOGERROR(ctxP->loggedError, ERR_L_LAN91C96,                     ERR_LAN91C96_RECEIVE, ERR_T_TIMEOUT, 0, 0, 0);*/   //printf("LAN91C96: Buffer deallocation timeout!");            return (ctxP->loggedError);        }    }    // Enable the receive interrupt and clear the receive flag.    intStatus = ReadByte(&ioRegsP[LAN91C96_INT_STATS]);    if (intStatus &  LAN91C96_IST_RCV_INT)    {        // Clear receive flag.        ctxP->rxFlag = 0;        // Read the Interrupt Mask Register.        maskRegister = ReadByte(&ioRegsP[LAN91C96_INT_MASK]);        // Set the Receive Interrupt bit.                    maskRegister |= LAN91C96_MSK_RCV_INT;        // Re-enable Receive interrupts.        WriteByte(maskRegister, &ioRegsP[LAN91C96_INT_MASK]);    }    return (ctxP->loggedError);}/********************************************************************************** FUNCTION:*    LAN91C96ReceiveStatus** DESCRIPTION:*    This routine returns the receive status of the LAN91C96.** INPUT PARAMETERS:*    LAN91C96_ContextT *ctxP - Pointer to the LAN91C96 Device Context Structure** RETURNS:*    0 = No pending receive packet.*    1 = Pending receive packet.** GLOBAL EFFECTS:*    None.** ASSUMPTIONS:*    None.** CALLS:*    WriteByte - To write a byte 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.*    GetTimeStamp - Get a tick count.*    GetDeltaTimeStamp - Get the time delta.** CALLED BY:*    Application or test code.** PROTOTYPE:*    INT LAN91C96ReceiveStatus(LAN91C96_ContextT *ctxP);*********************************************************************************/INT LAN91C96ReceiveStatus(LAN91C96_ContextT *ctxP){    PVUINT32 ioRegsP = ctxP->LAN91C96IoP;     // Get pointer to I/O space    UINT16 bankSelect, resultCode = 0;    UINT16 count ;    UCHAR intStatus;    UINT16 statusWord ;    // Get a time reference.    GetTimeStamp(ctxP);    // Save the current bank selection and switch to Bank 2.    bankSelect = ReadWord(&ioRegsP[LAN91C96_BANK_SELECT]);    // Select Bank 2    WriteByte(BANK2, &ioRegsP[LAN91C96_BANK_SELECT]);    // Get the Interrupt Status Register.    intStatus = ReadByte(&ioRegsP[LAN91C96_INT_STATS]);    // Check for receive overrun errors    if (intStatus & LAN91C96_IST_RX_OVRN_INT)    {        // Acknowledge the Receive Overrun interrupt.        WriteByte(LAN91C96_ACK_RX_OVRN_INT, &ioRegsP[LAN91C96_INT_ACK]);				//printf("Receive overrun occurred\n") ;				return(-1) ;    }    // Check the Receive Interrupt.    else if (intStatus & LAN91C96_IST_RCV_INT)    {      // Get the packet byte count, which is the byte count minus the      // status word, byte count and control byte.      // Get status word.      count = 0 ;      statusWord = ReadWord(&ioRegsP[LAN91C96_DATA_HIGH]);      if (statusWord & LAN91C96_ODD_FRM)      {                   count = 1 ;      }      ctxP->rxPacketLen = (UINT32)((0x7FF & statusWord) - 6) + count ;            // Indicate receive packet pending.        resultCode = 1 ;    }    // Restore the bank select register.    WriteByte(bankSelect, &ioRegsP[LAN91C96_BANK_SELECT]);    // Get delta time reference.    GetDeltaTimeStamp(ctxP, "Rx Status");    return (resultCode);}/********************************************************************************** FUNCTION:*    LAN91C96ReceivePacket** DESCRIPTION:*    This routine will read a single frame received by the LAN91C96.** INPUT PARAMETERS:*    LAN91C96_ContextT *ctxP - Pointer to the LAN91C96 Device Context Structure*    PUINT16 buffer - Pointer to the receive buffer to store the packet.  'buffer'*                     MUST BE allocated and validated by the calling entity*    INT length - Size of the receive buffer.  'length' is supplied by the caller*                 and must match the size of the received data.  *    PINT rxCountP - Number of bytes received.*    ** RETURNS:*    0 - Success*    non-zero - Error** GLOBAL EFFECTS:*    None.** ASSUMPTIONS:*    None.** CALLS:*    LAN91C96_Handler - LAN91C96 receive ISR handler (polled).*    DeallocateRxPacket - Return the receive packet back to the LAN91C96.*    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.*    ReadWord - Read a word from either the attribute or I/O space.*    GetTimeStamp - Get a tick count.*    GetDeltaTimeStamp - Get the time delta.*    DM_CWDbgPrintf - Display debug messages for this device.*    DM_Printf - Display text string.*    DM_ErrPrintf - Display error string.*    LAN91C96DumpFrame - Display packet.*    DisplayTxStatus - Display the transmit status register.*    LOGERROR - Logs errors encountered.** CALLED BY:*    Application or test code.** PROTOTYPE:*    INT LAN91C96ReceivePacket(LAN91C96_ContextT *ctxP, PUINT16 buffer,*                              INT length, PINT rxCountP);*********************************************************************************/INT LAN91C96ReceivePacket(LAN91C96_ContextT *ctxP, PUINT16 bufferP,                          INT length, PINT rxCountP){    PVUINT32 ioRegsP = ctxP->LAN91C96IoP;     // Get pointer to I/O space    UINT16 statusWord, controlWord, frameType;    UINT16 x = 0;    PUINT16 dataP;    UINT16 data;    UINT16 count = 0;    // Get a time reference.    GetTimeStamp(ctxP);    // Clear the receive count.    *rxCountP = 0;    // Check for received frames.    LAN91C96_Handler(ctxP);    // Process all received frames.    if (ctxP->rxFlag)    {        // Select Bank 2        WriteByte(BANK2, &ioRegsP[LAN91C96_BANK_SELECT]);        // Setup for Receive, Auto Increment and Read access.        WriteWord(LAN91C96_PTR_RX_FRAME, &ioRegsP[LAN91C96_POINTER]);        // Get status word.        statusWord = ReadWord(&ioRegsP[LAN91C96_DATA_HIGH]);        // Check for broadcast frames.        if (0 /*statusWord & FRAME_FILTER*/)        {//printf("3.LAN91C96ReceivePacket\n") ;            // Now deallocate the page.            DeallocateRxPacket(ctxP);            // Filter this frame out by ignoring it.            return (0);        }        else        {            // Process the frame, get the pointer to the user buffer.            dataP = bufferP;            // Get the packet byte count, which is the byte count minus the            // status word, byte count and control byte.            count = (0x7FF & ReadWord(&ioRegsP[LAN91C96_DATA_HIGH])) - 6;            // Check we have enough room to store the receive packet.            if (count > length)            {//printf("5.LAN91C96ReceivePacket\n") ;                // Now deallocate the page.                DeallocateRxPacket(ctxP);                /*LOGERROR(ctxP->loggedError, ERR_L_LAN91C96,                         ERR_LAN91C96_RECEIVE, ERR_T_NOT_AVAIL, 0, 0, 0);                DM_ErrPrintf("LAN91C96: Receive frame too big (%u) for buffer (%u)",                             count, length);*/                return (-1);            }        }                // Initialize the initial count.        x = 0;        // Check filter flag.        if (!ctxP->filterFlag)        {            // Filter out all broadcast packets except ARPs and IPs.            if (statusWord & LAN91C96_BROD_CAST)            {                // Get the ethernet frame header                for ( ; x < sizeof(EthernetHeaderT); x++)                {                    *dataP++ = ReadWord(&ioRegsP[LAN91C96_DATA_HIGH]);                }                // Check the protocol type.                frameType = ntohs(((EthernetHeaderT *)bufferP)->frameType);                if ((frameType != ETHERTYPE_ARP) && (frameType != ETHERTYPE_IP))                {                    // Now deallocate the page.                    DeallocateRxPacket(ctxP);                    // Filter this frame out by ignoring it.                    return (0);                }            }        }        // Read the rest of the data packet except the last 2 words which        // contain the CRC.#define CRC_LEN 2        for ( ; x < ((count >> 1) - (CRC_LEN >> 1)); x++)        {            // Drain the Receive FIFO.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩国产精品久久| 精品中文av资源站在线观看| 51久久夜色精品国产麻豆| 国产高清在线观看免费不卡| 亚洲一区二区av在线| 国产欧美精品国产国产专区| 欧美乱妇一区二区三区不卡视频| 国产999精品久久久久久绿帽| 婷婷丁香久久五月婷婷| 亚洲丝袜自拍清纯另类| 久久青草欧美一区二区三区| 在线电影欧美成精品| 91美女福利视频| 国产成人免费9x9x人网站视频| 日本午夜一区二区| 亚洲国产cao| 亚洲人成网站色在线观看| 国产日韩欧美精品电影三级在线| 6080亚洲精品一区二区| 在线观看亚洲精品| 波波电影院一区二区三区| 国产美女在线观看一区| 久久99精品久久久久久国产越南| 偷拍亚洲欧洲综合| 亚洲第一综合色| 一区二区三区资源| 亚洲视频小说图片| 亚洲人成小说网站色在线| 综合激情成人伊人| 最新日韩在线视频| 中文字幕视频一区| 最好看的中文字幕久久| 亚洲视频狠狠干| 亚洲老司机在线| 亚洲伦理在线精品| 亚洲欧美国产三级| 亚洲一区免费观看| 天堂av在线一区| 五月激情综合婷婷| 麻豆成人91精品二区三区| 美国十次综合导航| 麻豆精品国产传媒mv男同| 久久99精品国产.久久久久久| 国内欧美视频一区二区| 国产精品亚洲午夜一区二区三区| 国产福利91精品一区二区三区| 国产成人av电影在线播放| 国产成a人无v码亚洲福利| 99综合影院在线| 在线观看亚洲a| 777亚洲妇女| 日韩女优av电影在线观看| 26uuu久久天堂性欧美| 国产日韩欧美精品电影三级在线| 国产精品九色蝌蚪自拍| 亚洲综合成人在线| 久久se这里有精品| 成人视屏免费看| 91精彩视频在线| 555www色欧美视频| 国产亚洲精品精华液| 1区2区3区欧美| 午夜精品一区二区三区三上悠亚 | 亚洲一区二区精品3399| 三级成人在线视频| 国产精品一区二区不卡| 91原创在线视频| 在线播放一区二区三区| 2020国产精品| 亚洲黄色片在线观看| 丝袜诱惑亚洲看片| 成人一二三区视频| 欧美日韩一区二区在线观看视频| 日韩一区二区免费在线电影| 国产精品视频线看| 三级欧美在线一区| 99久久精品国产毛片| 欧美猛男男办公室激情| 国产欧美日韩在线| 亚洲三级在线看| 精品一二线国产| 色婷婷狠狠综合| 亚洲精品在线免费观看视频| 最新国产の精品合集bt伙计| 日韩影院免费视频| 99精品欧美一区二区三区综合在线| 欧美日韩一区二区在线视频| 国产女主播在线一区二区| 首页国产丝袜综合| 99久久免费精品| 欧美不卡123| 亚洲一区免费观看| 大白屁股一区二区视频| 91麻豆精品国产91久久久资源速度| 欧美高清一级片在线观看| 日韩av在线播放中文字幕| 色综合天天综合狠狠| 久久综合视频网| 亚洲另类在线制服丝袜| 国产成人午夜视频| 91精品久久久久久蜜臀| 国产精品乱码一区二区三区软件| 日本不卡123| 欧美系列日韩一区| ●精品国产综合乱码久久久久 | 国产一区二区三区四区在线观看| 91麻豆国产在线观看| 国产拍揄自揄精品视频麻豆| 日本少妇一区二区| 在线精品视频一区二区三四| 国产精品盗摄一区二区三区| 国产在线精品一区二区夜色| 337p亚洲精品色噜噜噜| 一区二区国产视频| 99re视频这里只有精品| 久久精品夜色噜噜亚洲aⅴ| 人人狠狠综合久久亚洲| 欧美色图激情小说| 亚洲一区二区三区小说| 色综合网站在线| 亚洲欧洲韩国日本视频 | 欧美乱妇15p| 亚洲高清中文字幕| 在线视频欧美精品| 国产精品色在线| 国产成人av影院| 国产午夜精品福利| 国产剧情一区在线| 国产午夜久久久久| 国产.精品.日韩.另类.中文.在线.播放| 日韩欧美国产1| 精品在线免费观看| 精品久久久久久久人人人人传媒| 日本美女视频一区二区| 日韩一区二区不卡| 麻豆高清免费国产一区| 欧美精品一区二区三区久久久| 久久综合综合久久综合| 精品国产乱码久久久久久图片| 麻豆精品国产91久久久久久| 精品欧美一区二区久久| 国产精品99久久久久久宅男| 国产日韩欧美麻豆| 成人国产精品免费观看| 亚洲猫色日本管| 欧美视频中文字幕| 日韩高清在线观看| 精品日韩一区二区三区| 国产美女视频91| 1区2区3区欧美| 欧美日韩在线精品一区二区三区激情| 亚洲福利一区二区三区| 日韩丝袜情趣美女图片| 国产在线视视频有精品| 国产精品丝袜在线| 欧美一区二区三区的| 国产一区在线观看视频| 亚洲国产精品ⅴa在线观看| 91在线观看视频| 亚洲成人av免费| 久久色.com| 91色九色蝌蚪| 日韩成人精品视频| 久久久国产精华| 91在线观看视频| 美女国产一区二区三区| 中文字幕国产一区二区| 欧美性淫爽ww久久久久无| 久久精品国产亚洲a| 亚洲国产精品成人综合 | 日韩女优av电影| 成人晚上爱看视频| 丝袜国产日韩另类美女| 国产女人aaa级久久久级| 在线免费观看视频一区| 老司机精品视频在线| 国产精品无码永久免费888| 欧美日韩国产首页在线观看| 国内欧美视频一区二区| 亚洲一区二区精品3399| 国产三级欧美三级| 欧美精品1区2区| 成人免费视频免费观看| 日本午夜精品视频在线观看| 中文字幕一区不卡| 精品久久久久久久一区二区蜜臀| 色哟哟一区二区三区| 精品系列免费在线观看| 亚洲综合精品自拍| 中文字幕av资源一区| 欧美一级免费大片| 色一情一乱一乱一91av| 国产精品一区二区三区四区| 午夜影院久久久| 国产一区二区三区不卡在线观看| 夜夜精品浪潮av一区二区三区| 精品国产免费久久| 337p亚洲精品色噜噜| 91啪在线观看| 国产精品99久久久久|