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

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

?? lan91c96.c

?? 移植到WLIT項目的redboot源代碼
?? 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一区二区三区免费野_久草精品视频
91国在线观看| 久久国产人妖系列| 日本一区二区视频在线观看| 777亚洲妇女| 肉肉av福利一精品导航| 欧美片在线播放| 欧美色老头old∨ideo| 日韩伦理电影网| 91影视在线播放| 成人免费小视频| 99视频精品在线| 最新不卡av在线| 91久久精品一区二区| 亚洲午夜久久久久中文字幕久| 91久久精品一区二区| 亚洲成av人片一区二区三区| 欧美日韩在线三区| 欧美a一区二区| 精品国产制服丝袜高跟| 国产剧情一区二区| 国产欧美日产一区| 日本精品一区二区三区高清| 亚洲三级电影网站| 91精品国产综合久久久久久漫画| 日韩不卡一二三区| 久久亚洲一级片| 高清久久久久久| 国产人成一区二区三区影院| 91蜜桃婷婷狠狠久久综合9色| 亚洲精品亚洲人成人网| 欧美精品丝袜中出| 极品少妇xxxx精品少妇偷拍| 亚洲国产精品av| 在线视频国内自拍亚洲视频| 日韩中文字幕一区二区三区| 久久久久99精品一区| av一本久道久久综合久久鬼色| 夜夜亚洲天天久久| 精品国产乱码久久久久久久| 国产69精品一区二区亚洲孕妇| 亚洲黄色小视频| 久久一区二区视频| 欧洲日韩一区二区三区| 精品一区二区三区av| 国产精品国产馆在线真实露脸| 欧美日韩成人综合| 国产成人在线看| 天天免费综合色| 欧美成人一区二区三区在线观看| 国模大尺度一区二区三区| 樱花草国产18久久久久| 久久九九影视网| 欧美性一二三区| 国产成人在线色| 男女性色大片免费观看一区二区| 国产精品你懂的在线欣赏| 欧美一区二区三区视频在线观看| www.欧美.com| 久久丁香综合五月国产三级网站| 亚洲男同性恋视频| 欧美一区二区三区日韩视频| 色美美综合视频| 国产精品自拍一区| 日本vs亚洲vs韩国一区三区| 1024成人网色www| 久久久久久99精品| 日韩免费福利电影在线观看| 欧美日韩国产免费| 色婷婷国产精品| 成人av免费观看| 国产成人一级电影| 日韩中文字幕麻豆| 亚洲国产综合在线| 亚洲日本在线天堂| 18成人在线观看| 国产精品美女视频| 久久综合精品国产一区二区三区| 制服丝袜日韩国产| 欧美性生活大片视频| 91在线无精精品入口| 成人高清伦理免费影院在线观看| 日韩不卡一区二区| 日韩电影在线一区| 天堂午夜影视日韩欧美一区二区| 亚洲人快播电影网| 亚洲视频一区在线| 精品国产99国产精品| 日韩欧美国产午夜精品| 欧美男男青年gay1069videost | 日韩三区在线观看| 欧美老肥妇做.爰bbww视频| 色综合视频在线观看| 91污在线观看| www.欧美亚洲| 日本韩国视频一区二区| 91国模大尺度私拍在线视频| 91福利国产精品| 成人午夜视频网站| 成人免费黄色在线| 日本道精品一区二区三区| 91国产免费观看| 欧美性色综合网| 91精品国产一区二区三区香蕉| 日韩欧美中文字幕制服| 欧美一区二区视频免费观看| 久久噜噜亚洲综合| 亚洲情趣在线观看| 日韩成人精品在线观看| 国产xxx精品视频大全| 一本一道久久a久久精品综合蜜臀| 欧美日韩亚洲综合在线| 久久综合色鬼综合色| 亚洲欧美色综合| 麻豆精品视频在线| av影院午夜一区| 91精品国产一区二区三区蜜臀 | 国产欧美一区二区三区沐欲| 亚洲视频1区2区| 老司机精品视频导航| 成人av在线一区二区| 91精品国产91久久久久久一区二区| 久久久久久久综合| 亚洲国产成人91porn| 国产精品一区三区| 欧美精品自拍偷拍| 国产精品―色哟哟| 捆绑调教一区二区三区| 91极品美女在线| 国产欧美日本一区视频| 奇米影视在线99精品| 91福利视频久久久久| 国产无一区二区| 蜜臀av在线播放一区二区三区| 色综合天天综合网天天看片| 久久先锋影音av| 日韩国产成人精品| 在线免费观看视频一区| 国产精品欧美一级免费| 精品在线你懂的| 91精品视频网| 亚洲电影一级片| 91丝袜美腿高跟国产极品老师| 国产午夜精品一区二区三区四区| 天天色天天爱天天射综合| 色综合中文字幕国产 | 亚洲成精国产精品女| 成人福利视频网站| 久久久综合网站| 久久精品国产99| 正在播放亚洲一区| 午夜欧美2019年伦理| 欧美综合亚洲图片综合区| 中文字幕在线一区二区三区| 国产剧情在线观看一区二区| 精品国产一区二区亚洲人成毛片 | 91福利精品视频| 亚洲少妇中出一区| www.一区二区| 欧美国产一区在线| 国产电影精品久久禁18| 久久精品一区蜜桃臀影院| 韩国三级在线一区| 精品久久国产老人久久综合| 蜜臀av性久久久久蜜臀aⅴ| 91精品国产综合久久久久久久| 亚洲大片免费看| 欧美精品99久久久**| 午夜精品成人在线| 69精品人人人人| 老司机精品视频导航| 精品盗摄一区二区三区| 国产乱淫av一区二区三区| 久久久不卡影院| 国产宾馆实践打屁股91| 中文字幕制服丝袜一区二区三区 | 成人欧美一区二区三区1314| 91在线精品秘密一区二区| 亚洲免费在线看| 欧美性猛片xxxx免费看久爱| 日韩高清在线不卡| 精品乱人伦小说| 国产精品白丝jk黑袜喷水| 国产精品每日更新| 91丝袜高跟美女视频| 亚洲国产精品精华液网站| 在线不卡免费av| 国产专区欧美精品| 日韩伦理av电影| 717成人午夜免费福利电影| 久久99国内精品| 国产精品污网站| 欧美亚洲日本一区| 久久精品二区亚洲w码| 国产三级欧美三级| 99精品一区二区三区| 午夜不卡av免费| 久久久久久久久久久久久久久99 | 欧美性大战久久久久久久蜜臀| 日韩精品电影在线观看| 久久久久88色偷偷免费|