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

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

?? i82550sio.c

?? z85c30 DRIVER RUN ON PC104 PC AND VXWORKS SYSTERM.
?? C
?? 第 1 頁 / 共 3 頁
字號:
     * TODO -  Typically, acknowledge the interrupt as soon as possible.     * Usually before passing data or error conditions upstream.     */    I82550_SIO_WRITE8(pChan,		I82550_CSR_ID, I82550_RESET_INT); /* ack interrupt*/    if (status == ERROR)	{	/* send error notification upstream */	(*pChan->errorRtn) (pChan->errorArg, SIO_ERROR_UNKNWN, NULL, 0);	}    else	{	/* send data character upstream */	(*pChan->putRcvChar) (pChan->putRcvArg, inChar);	}    }/******************************************************************************** i82550SioIntTx - handle a channels transmitter-ready interrupt** RETURNS: N/A*/ LOCAL void i82550SioIntTx    (    I82550_CHAN *	pChan		/* channel generating the interrupt */    )    {    char	outChar;    char	crData = 0;    BOOL	txReady = TRUE;    int		errorCode = SIO_ERROR_NONE;    /*     * TODO - Check the Tx status     *     * For PCI devices, do an immediate return if device is not asserting     * an interrupt.     */    I82550_PIPE_FLUSH(pChan);    I82550_SIO_READ8(pChan, I82550_CSR_ID, &crData);    /* TODO - Check for error conditions */    if (crData & I82550_CR_TX_ERROR)	{	/*	 * TODO - Typically you should determine the precise error condition	 * and perform all recovery operations here.	 */	I82550_SIO_WRITE8 (pChan, I82550_CSR_ID, I82550_RESET_TX);	errorCode = SIO_ERROR_UNKNWN;	txReady = TRUE; /* set to false if xmitter is not ready now */	}    /*     * If transmitter is okay and ready to send, lets see if there is a     * data character ready to be sent.     *     * If there's a character to transmit then write it out, else reset (idle)     * the transmitter. For chips with output FIFO's it is more efficient     * to fill the entire FIFO here.     */    if (txReady)	{	if ((*pChan->getTxChar) (pChan->getTxArg, &outChar) != ERROR)	    {	    /* TODO - Output data to device.  */	    I82550_SIO_WRITE8(pChan, I82550_DATA_ID, outChar);	    /*	     * TODO - If a device error occurs at this point, then	     * isolate the precise error type and try to recover.	     */	    }	else	    {	    /*	     * TODO - There is no more data to send.	     *	     * Put XMTR in an idle state. Higher layer	     * will call TxStartup entry to resume xmit operations.	     */	    I82550_SIO_WRITE8(pChan, I82550_CSR_ID, I82550_RESET_TX);	    }	}    /*     * TODO - If needed, you should acknowledge or reset the interrupt source     * as soon as possible, usually before passing any error conditions     * upstream.     */    I82550_SIO_WRITE8(pChan, I82550_CSR_ID, I82550_RESET_INT);    /* Pass any errorCodes upstream.  */    if (errorCode != SIO_ERROR_NONE)	{	(*pChan->errorRtn) (pChan->errorArg, errorCode, NULL, 0);	}    }/******************************************************************************** i82550SioIntErr - handle a channels error interrupt** RETURNS: N/A*/ LOCAL void i82550SioIntErr    (    I82550_CHAN *	pChan		/* channel generating the interrupt */    )    {    int errorCode = SIO_ERROR_NONE;    char controlReg;    I82550_PIPE_FLUSH(pChan);    I82550_SIO_READ8 (pChan, I82550_CSR_ID, &controlReg);    /*     * TODO - Determine the precise error condition and perform recovery     * operations.     *     * For PCI devices, do an immediate return if device is not asserting     * an interrupt.     */    /*     * TODO - If needed, you should acknowledge or reset the interrupt source     * as soon as possible, usually before passing any error conditions     * upstream.     */    I82550_SIO_WRITE8(pChan, I82550_CSR_ID, I82550_RESET_INT);    if (errorCode != SIO_ERROR_NONE)	(*pChan->errorRtn) (pChan->errorArg, errorCode, NULL, 0);    }/******************************************************************************** i82550TxStartup - start the interrupt transmitter** This routine exits to inform the device to start transmitting data again.* The actual data will be obtained by calling the TxCharGet callback routine.** This routine is usually just the same as the tx interrupt routine.  This* routine runs at task level context and does not have to be interrupt safe.** RETURNS: OK on success, ENOSYS if the device is polled-only, or* EIO on hardware error.*/LOCAL int i82550TxStartup    (    SIO_CHAN * pSioChan                 /* channel to start */    )    {    I82550_CHAN * pChan = (I82550_CHAN *)pSioChan;    /* This routine should only be called while in interrupt mode */    if (pChan->mode == SIO_MODE_INT)        {        if (pChan->options & CLOCAL)            {            /* TODO - No modem control - start immediately */            }        else            {	    /*	     * TODO - Modem controls are active. 	     *	     * If CTS is high, we can start immediately so just enable	     * the TX interrupt.	     *	     * If CTS is low, then we cannot send now.  The driver	     * should be set up to generate a TX interrupt when the CTS	     * line returns to the active state.	     */            }        /*	 * TODO - Enable the correct interrupts. A TX interrupt should either	 * occur immediately, or later when CTS becomes active.  That will start	 * the flow of data.	 *	 * There are two usual methods here.  The first is to just enable	 * TX interrupts, which should cause an immediate TX interrupt, which	 * will begin fetching and sending characters.	 *	 * The second method is to call the getTxChara callback here, put	 * the data to the transmitter directly, and then to enable TX	 * interrupts to fetch and send additional characters.	 */	I82550_SIO_WRITE8(pChan, I82550_CSR_ID, I82550_TX_ENABLE);        }    else	return ENOSYS;  	/* Not valid for polled mode operation */    return (OK);    }/******************************************************************************** i82550CallbackInstall - install ISR callbacks to get/put chars** This driver allows interrupt callbacks for transmitting characters* and receiving characters. In general, drivers may support other* types of callbacks too.** RETURNS: OK on success, or ENOSYS for an unsupported callback type.*/ LOCAL int i82550CallbackInstall    (    SIO_CHAN *	pSioChan,               /* channel */    int		callbackType,           /* type of callback */    STATUS	(*callback)(void *,...),  /* callback */    void *      callbackArg             /* parameter to callback */    )    {    I82550_CHAN * pChan = (I82550_CHAN *)pSioChan;    switch (callbackType)	{	case SIO_CALLBACK_GET_TX_CHAR:	    pChan->getTxChar	= (STATUS (*)(void *, char *))callback;	    pChan->getTxArg	= callbackArg;	    return (OK);	case SIO_CALLBACK_PUT_RCV_CHAR:	    pChan->putRcvChar	= (void (*)(void *, char))callback;	    pChan->putRcvArg	= callbackArg;	    return (OK);	case SIO_CALLBACK_ERROR:	    pChan->errorRtn	= (void (*)(void *, int, void *, int))callback;	    pChan->errorArg	= callbackArg;	    return (OK);	default:	    return (ENOSYS);	}    }/********************************************************************************* i82550PollOutput - output a character in polled mode** Polled mode operation takes place without any kernel or other OS* services available.  Use extreme care to insure that this code does not* call any kernel services.  Polled mode is only for WDB system mode use.* Kernel services, semaphores, tasks, etc, are not available during WDB* system mode.** RETURNS: OK if a character arrived, EIO on device error, EAGAIN* if the output buffer if full. ENOSYS if the device is* interrupt-only.*/LOCAL int i82550PollOutput    (    SIO_CHAN *	pSioChan,    char	outChar    )    {    I82550_CHAN * pChan = (I82550_CHAN *)pSioChan;    UINT8	status;    /* is the transmitter ready to accept a character? */    I82550_PIPE_FLUSH(pChan);    I82550_SIO_READ8(pChan, I82550_CSR_ID, &status);    /* TODO - determine if transmitter is ready */    if ((status & I82550_CR_TX_READY) == 0x00)	{	/* device is busy, try again later */	return (EAGAIN);	}    /* TODO - Check for TX errors */    if (status & I82550_CR_TX_ERROR)	{	/* TODO - decode specific error condition and handle it */	/* Do not make error callback, just return EIO */	return EIO;	}    else	{	/* TODO - transmit the character */	I82550_SIO_WRITE8(pChan, I82550_DATA_ID, outChar);	}    return (OK);    }/******************************************************************************** i82550PollInput - poll the device for input** Polled mode operation takes place without any kernel or other OS* services available.  Use extreme care to insure that this code does not* call any kernel services.  Polled mode is only for WDB system mode use.* Kernel services, semaphores, tasks, etc, are not available during WDB* system mode.** RETURNS: OK if a character arrived, EIO on device error, EAGAIN* if the input buffer if empty, ENOSYS if the device is* interrupt-only.*/LOCAL int i82550PollInput    (    SIO_CHAN *	pSioChan,    char *	thisChar    )    {    I82550_CHAN * pChan = (I82550_CHAN *)pSioChan;    UINT8	status;    /* Read RX device status */    I82550_PIPE_FLUSH(pChan);    I82550_SIO_READ8(pChan, I82550_CSR_ID, &status);    /* TODO - Check if receive data is available */    if ((status & I82550_CR_RX_AVAIL) == 0x00)	{	return EAGAIN;	/* no input available at this time */	}    /* TODO - Check for receive error conditions */    if (status & I82550_CR_RX_ERROR)	{	/* TODO - Decode and handle the specific error condition */	/* Do NOT call the error callback routine, just return EIO */	return EIO;	}    /* TODO - read character, store it, and return OK  */    I82550_SIO_READ8(pChan, I82550_DATA_ID, thisChar);    return (OK);    }/******************************************************************************** i82550ModeSet - toggle between interrupt and polled mode** RETURNS: OK on success, EIO on unsupported mode.*/LOCAL int i82550ModeSet    (    I82550_CHAN * pChan,		/* channel */    uint_t	    newMode          	/* new mode */    )    {    UINT8 temp;    if ((newMode != SIO_MODE_POLL) && (newMode != SIO_MODE_INT))	return (EIO);    I82550_PIPE_FLUSH(pChan);    if (pChan->mode == SIO_MODE_INT)	{	/* TODO - switch device to interrupt mode */	if (pChan->intConnect == FALSE)	    {	    I82550_SIO_INT_CONNECT(pChan,I82550_RXINT_ID,			    i82550SioIntRcv, (void *)pChan);	    I82550_SIO_INT_CONNECT(pChan, I82550_TXINT_ID,			    i82550SioIntTx, (void *)pChan);	    I82550_SIO_INT_CONNECT(pChan, I82550_ERRINT_ID,			    i82550SioIntErr, (void *)pChan);	    pChan->intConnect = TRUE;	    }	I82550_SIO_READ8(pChan, I82550_CSR_ID, &temp);	temp |= I82550_INT_ENABLE;	I82550_SIO_WRITE8(pChan, I82550_CSR_ID, temp);	}    else	{	/* TODO - switch device to polled mode */	I82550_SIO_READ8(pChan, I82550_CSR_ID, &temp);	temp &= ~I82550_INT_ENABLE;	I82550_SIO_WRITE8(pChan, I82550_CSR_ID, temp);	}    /* activate  the new mode */    pChan->mode = newMode;    return (OK);    }/********************************************************************************* i82550Hup - hang up the modem control lines ** Resets the RTS and DTR signals.** RETURNS: OK always.*/LOCAL STATUS i82550Hup    (    I82550_CHAN * pChan 	/* pointer to channel */    )    {    /*     * TODO - Use global intLock if lockout time will be very short. If not,     * use a device specific lockout that will not damage overall system     * latency.     */    i82550MstatSetClr (pChan,(SIO_MODEM_RTS|SIO_MODEM_DTR), FALSE);    return (OK);    }    /********************************************************************************* i82550Open - Set the modem control lines ** Set the modem control lines(RTS, DTR) TRUE if not already set.  ** RETURNS: OK*/LOCAL STATUS i82550Open    (    I82550_CHAN * pChan 	/* pointer to channel */    )    {    /*     * TODO - Use global intLock if lockout time will be very short. If not,     * use a device specific lockout that will not damage overall system     * latency.     */    i82550MstatSetClr (pChan, (SIO_MODEM_RTS|SIO_MODEM_DTR), TRUE);    return (OK);    }/******************************************************************************** i82550OptSet - set hardware options** This routine sets up the hardware according to the specified option* argument.  If the hardware cannot support a particular option value, then* it should ignore that portion of the request.** RETURNS: OK upon success, or EIO for invalid arguments.*/LOCAL int i82550OptSet    (    I82550_CHAN * pChan,		/* channel */    uint_t	    newOpts          	/* new options */    )    {    int dataBits = 8;    int stopBits = 1;    BOOL hdweFlowCtrl=TRUE;    BOOL rcvrEnable = TRUE;    int  lvl;    if (pChan == NULL || newOpts & 0xffffff00)	return EIO;    /* do nothing if options already set */    if (pChan->options == newOpts)	return OK;    /* ignore requests for unsupported options */    /* decode individual request elements */    switch (newOpts & CSIZE)	{	case CS5:	    dataBits = 5; break;	case CS6:	    dataBits = 6; break;	case CS7:	    dataBits = 7; break;	default:	case CS8:	    dataBits = 8; break;	}    if (newOpts & STOPB)	stopBits = 2;    else	stopBits = 1;    switch (newOpts & (PARENB|PARODD))	{	case PARENB|PARODD:	    /* enable odd parity */	    break;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美本精品男人aⅴ天堂| 麻豆精品精品国产自在97香蕉| 国产sm精品调教视频网站| www激情久久| 国产99久久久久久免费看农村| 欧美videofree性高清杂交| 精品一区二区免费看| 欧美精品一区二区三区蜜臀| 国产经典欧美精品| 亚洲私人影院在线观看| 在线亚洲免费视频| 日本麻豆一区二区三区视频| 欧美成人一区二区| 国产传媒久久文化传媒| 国产精品国产馆在线真实露脸| 91在线免费看| 天天av天天翘天天综合网色鬼国产| 日韩欧美第一区| 久久精品国产久精国产| 国产精品国产三级国产aⅴ中文| 99久久免费精品| 亚洲一区二区欧美| 亚洲精品在线观| 丁香桃色午夜亚洲一区二区三区| 成人免费小视频| 欧美日韩在线播| 日本sm残虐另类| 国产午夜精品久久久久久久 | 国产精品丝袜在线| 99久久er热在这里只有精品66| 亚洲精品国产一区二区精华液| 在线精品视频一区二区三四| 麻豆91在线看| 亚洲精品福利视频网站| 精品国产一区二区三区不卡 | 日本一区二区三区dvd视频在线| 99视频国产精品| 午夜精品久久久久久久蜜桃app| 久久色中文字幕| a4yy欧美一区二区三区| 理论电影国产精品| 亚洲激情综合网| 欧美精品一区二区在线观看| 一本一道综合狠狠老| 美国精品在线观看| 一区二区三区日韩精品视频| 亚洲精品一区二区精华| 一本大道久久a久久精二百| 精品一区二区免费在线观看| 亚洲成在线观看| 久久蜜桃av一区二区天堂 | 国产v综合v亚洲欧| 亚洲www啪成人一区二区麻豆| 精品久久久久久久久久久院品网 | 欧美亚洲一区二区在线| 国产精品一级在线| 日韩av中文在线观看| 亚洲欧美自拍偷拍| 久久久久国产成人精品亚洲午夜| 在线播放欧美女士性生活| 91丨porny丨户外露出| 国产在线精品一区在线观看麻豆| 亚洲电影第三页| 亚洲综合男人的天堂| 国产精品成人一区二区三区夜夜夜| 久久奇米777| 欧美一级免费大片| 欧美一区二区三区视频在线| 欧美日韩亚州综合| 91福利精品视频| 日本丰满少妇一区二区三区| 不卡一区二区在线| 成人在线一区二区三区| 国产福利91精品一区| 国产精品一二三在| 国产成人免费视频网站高清观看视频| 美国精品在线观看| 成人黄页在线观看| 国产精品影视网| 国产乱人伦偷精品视频免下载 | 国产白丝网站精品污在线入口| 黄色精品一二区| 国产在线视频一区二区三区| 国产一区在线看| 国产大陆a不卡| 懂色av一区二区三区蜜臀| 成人午夜在线视频| 91亚洲国产成人精品一区二区三| 不卡一区二区三区四区| 91亚洲精品久久久蜜桃| 91福利社在线观看| 欧美人与性动xxxx| 91精品国产综合久久婷婷香蕉| 欧美成人性福生活免费看| 久久尤物电影视频在线观看| 亚洲精品一区二区三区影院| 国产三级精品三级在线专区| 国产精品久久午夜夜伦鲁鲁| 亚洲黄色在线视频| 天堂精品中文字幕在线| 免费观看久久久4p| 成人午夜激情片| 91黄色免费网站| 欧美电影影音先锋| 久久女同性恋中文字幕| 国产精品无圣光一区二区| 一区二区三区四区国产精品| 日韩精品乱码av一区二区| 奇米影视一区二区三区| 国产精品一区二区久久不卡 | 欧美亚一区二区| 日韩一区二区三| 国产日产亚洲精品系列| 亚洲一区二区三区四区五区黄 | 欧美在线影院一区二区| 欧美日本一道本在线视频| 亚洲精品一区二区三区四区高清| 国产精品久久毛片a| 亚洲一区二区视频| 国内精品嫩模私拍在线| 91婷婷韩国欧美一区二区| 337p亚洲精品色噜噜狠狠| 2020日本不卡一区二区视频| 国产精品国模大尺度视频| 偷拍亚洲欧洲综合| 粉嫩av一区二区三区在线播放| 一本久久精品一区二区| 欧美一区二区在线观看| 国产精品嫩草影院av蜜臀| 日韩av午夜在线观看| 国产成人亚洲综合a∨婷婷图片| 欧美日韩一区高清| 中文乱码免费一区二区| 青青草原综合久久大伊人精品| 国产一区二区三区四区五区美女 | 亚洲六月丁香色婷婷综合久久| 偷拍一区二区三区| 99久久精品久久久久久清纯| 欧美一区二区三区色| 亚洲精品国产a久久久久久| 国内精品在线播放| 日本道色综合久久| 亚洲国产精品高清| 青青草精品视频| 欧美体内she精高潮| 日本一区二区三区免费乱视频| 亚洲电影视频在线| 在线一区二区视频| 国产精品美女久久福利网站| 免费一级欧美片在线观看| 94-欧美-setu| 国产精品欧美久久久久无广告| 玖玖九九国产精品| 国产精品三级久久久久三级| 亚洲裸体在线观看| 国产精品亚洲综合一区在线观看| 欧美性色黄大片| 亚洲精选免费视频| 91在线视频在线| 亚洲视频你懂的| 国产成人精品亚洲日本在线桃色 | 美日韩一区二区| 欧美老女人第四色| 亚洲一区视频在线| 欧洲日韩一区二区三区| 最新中文字幕一区二区三区 | 国产精品水嫩水嫩| 国产精品18久久久久久久网站| 337p粉嫩大胆色噜噜噜噜亚洲| 久久精品国产亚洲一区二区三区| 91精品久久久久久久91蜜桃| 香蕉av福利精品导航| 欧美色综合天天久久综合精品| 一区二区三区四区蜜桃| 91色九色蝌蚪| 一区二区三区 在线观看视频| 91香蕉视频mp4| 亚洲天堂2014| 91极品美女在线| 亚洲国产日韩一级| 91国偷自产一区二区三区成为亚洲经典 | 国产精品久久久久久久蜜臀| 国产成人av影院| 亚洲国产高清在线| 不卡欧美aaaaa| 亚洲品质自拍视频| 在线观看国产一区二区| 性做久久久久久久久| 日韩一二三区不卡| 国产资源在线一区| 久久久久久久综合| av电影在线观看一区| 亚洲黄色性网站| 欧美日韩1234| 激情综合网天天干| 久久精品亚洲乱码伦伦中文 | 91视频一区二区三区| 亚洲黄色在线视频| 欧美成人video| 成人午夜又粗又硬又大|