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

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

?? i82550sio.c

?? z85c30 DRIVER RUN ON PC104 PC AND VXWORKS SYSTERM.
?? C
?? 第 1 頁 / 共 3 頁
字號:
	case PARENB:	    /* enable even parity */	    break;	case PARODD:	    /* invalid mode, not normally used. */	    break;	default:	case 0:	    /* no parity */; break;	}    if (newOpts & CLOCAL)	{	/* clocal disables hardware flow control */	hdweFlowCtrl = FALSE;	}    if ((newOpts & CREAD) == 0)	rcvrEnable = FALSE;    lvl = intLock ();    /*     * TODO - Reset the device according to dataBits, stopBits, hdweFlowCtrl,     * rcvrEnable, and parity selections.     */        intUnlock (lvl);    /*     * TODO - Be sure that pChan->options reflects the actual     * hardware settings.  If 5 data bits were requested, but unsupported,     * then be sure pChan->options reflects the actual number of data bits     * currently selected.     */    pChan->options = newOpts;    return (OK);    }/********************************************************************************* i82550Ioctl - special device control** This routine handles the IOCTL messages from the user. It supports commands * to get/set baud rate, mode(INT,POLL), hardware options(parity, number of * data bits) and modem control(RTS/CTS and DTR/DSR handshakes).* The ioctl commands SIO_HUP and SIO_OPEN are used to implement the HUPCL(hang* up on last close) function.** As on a UNIX system, requesting a baud rate of zero is translated into* a hangup request.  The DTR and RTS lines are dropped.  This should cause* a connected modem to drop the connection.  The SIO_HUP command will only* hangup if the HUPCL option is active.  The SIO_OPEN function will raise* DTR and RTS lines whenever it is called. Use the BAUD_RATE=0 function* to hangup when HUPCL is not active.** The CLOCAL option will disable hardware flow control.  When selected,* hardware flow control is not used.  When not selected hardware flow control* is based on the RTS/CTS signals.  CTS is the clear to send input* from the other end.  It must be true for this end to begin sending new* characters.  In most drivers, the RTS signal will be assumed to be connected* to the opposite end's CTS signal and can be used to control output from* the other end.  Raising RTS asserts CTS at the other end and the other end* can send data.  Lowering RTS de-asserts CTS and the other end will stop* sending data. (This is non-EIA defined use of RTS).** RETURNS: OK on success, ENOSYS on unsupported request, EIO on failed* request.*/LOCAL int i82550Ioctl    (    SIO_CHAN *	pSioChan,		/* device to control */    int		request,		/* request code */    void *	someArg			/* some argument */    )    {    I82550_CHAN *pChan = (I82550_CHAN *) pSioChan;    int     oldLevel;		/* current interrupt level mask */    int     baudConstant;    int     arg = (int)someArg;    I82550_PIPE_FLUSH(pChan);    switch (request)	{	case SIO_BAUD_SET:	    /*	     * like unix, a baud request for 0 is really a request to	     * hangup.	     */	    if (arg == 0)		return (i82550Hup (pChan));	    /*	     * Set the baud rate. Return EIO for an invalid baud rate, or	     * OK on success.	     */	    if (arg < I82550_BAUD_MIN || arg > I82550_BAUD_MAX)	        {		return (EIO);	        }	    /* TODO - Calculate the baud rate constant for the new baud rate */	    baudConstant = pChan->clkFreq / arg / 16; /* DUMMY CODE */	    /* disable interrupts during chip access */	    oldLevel = intLock ();	    I82550_SIO_WRITE8(pChan, I82550_BAUD_ID, baudConstant);	    intUnlock (oldLevel);	    pChan->baudFreq = arg;	    return (OK);	case SIO_BAUD_GET:	    *(int *)someArg = pChan->baudFreq;	    return (OK);	case SIO_MODE_SET:	    /*	     * Set the mode (e.g., to interrupt or polled). Return OK	     * or EIO for an unknown or unsupported mode.	     */	    return (i82550ModeSet (pChan, arg));	case SIO_MODE_GET:	    /* Get the current mode and return OK.  */	    *(int *)someArg = pChan->mode;	    return (OK);	case SIO_AVAIL_MODES_GET:	    /* TODO - set the available modes and return OK.  */	    *(int *)someArg = SIO_MODE_INT | SIO_MODE_POLL;	    return (OK);	case SIO_HW_OPTS_SET:	    /*	     * Optional command to set the hardware options (as defined	     * in sioLib.h).	     * Return OK, or ENOSYS if this command is not implemented.	     * Note: several hardware options are specified at once.	     * This routine should set as many as it can and then return	     * OK. The SIO_HW_OPTS_GET is used to find out which options	     * were actually set.	     */	    return (i82550OptSet (pChan, arg));	case SIO_HW_OPTS_GET:	    /*	     * Optional command to get the hardware options (as defined	     * in sioLib.h). Return OK or ENOSYS if this command is not	     * implemented.  Note: if this command is unimplemented, it	     * will be assumed that the driver options are CREAD | CS8	     * (e.g., eight data bits, one stop bit, no parity, ints enabled).	     */	    *(int *)someArg = pChan->options;	    return (OK);        case SIO_HUP:            /* check if hupcl option is enabled */            if (pChan->options & HUPCL)                 return (i82550Hup (pChan));            return (OK);        case SIO_OPEN:	    return (i82550Open (pChan)); /* always open */#if 1 /* TODO - optional modem control line support */	/*	 * These new ioctl commands are for monitoring and setting the	 * state of the modem control lines under user control. The	 * return values from these calls inform the user about which	 * control lines are inputs and which are outputs. Basically	 * this lets the user know if the device is wired for DTE or	 * DCE configuration.  It also informs the user if any signals	 * are missing altogether.	 */	case SIO_MSTAT_GET:	    return i82550MstatGet(pChan);	case SIO_MCTRL_BITS_SET:	    return i82550MstatSetClr (pChan, arg, TRUE);	case SIO_MCTRL_BITS_CLR:	    return i82550MstatSetClr (pChan, arg, FALSE);	/*	 * The ISIG and OSIG masks tell the user which signals are actually	 * outputs and which aren't. In our case here, we assume the device	 * is DTE mapped with DTR and RTS as outputs. DSR and CTS as inputs.	 * This i82550 driver doesn't support RI.	 */	case SIO_MCTRL_OSIG_MASK:	    *(int *)someArg = I82550_OSIG_MASK;	    break;	case SIO_MCTRL_ISIG_MASK:	    *(int *)someArg = I82550_ISIG_MASK;	    break;#endif /* optional Modem control line support */#if 1 /* TODO - optional keyboard scan code support */	/*	 * The following new ioctl commands are meant only for keyboard	 * input devices to use.  These allow the user to specify and	 * examine the type of keyboard character mapping to use.  The	 * possible types are NONE (raw scan codes), ASCII (default ascii	 * mappings, and UNICODE for standard 16 bit unicode mappings.	 *	 * Our i82550 driver supports only raw and ascii modes.	 */	case SIO_KYBD_MODE_SET:	    switch (arg)		{		case SIO_KYBD_MODE_RAW:		case SIO_KYBD_MODE_ASCII:		    break;		case SIO_KYBD_MODE_UNICODE:		    return ENOSYS; /* i82550 doesn't support unicode */		}	    pChan->scanMode = arg;	    return OK;	case SIO_KYBD_MODE_GET:	    *(int *)someArg = pChan->scanMode;	    return OK;#endif /* optional keyboard scan code support */	default:	    return ENOSYS;	}    return OK;    }/********************************************************************************* dummyTxCallback - dummy Tx callback routine** RETURNS: ERROR.*/LOCAL STATUS dummyTxCallback    (    void * callbackArg,	/* argument registered with callback */    char * pChara 	/* ptr to data location */    )    {    static BOOL doit = TRUE;    /*     * TODO - Until an upstream module connects to this device, there     * is no data available to send.  We should only be concerned     * if this callback is being called repeatedly and often. That     * could indicate an interrupt servicing problem of some kind.     */    if (doit)	{	printf ("Dummy txCallback: 0x%x 0x%x\n",		(int)callbackArg, (int)pChara);	doit = FALSE;	}    return (ERROR);    }/********************************************************************************* dummyRxCallback - dummy Rx callback routine** RETURNS: N/A.* ARGSUSED*/LOCAL void dummyRxCallback    (    void * callbackArg,	/* argument registered with callback */    char data 		/* receive data */    )    {    static BOOL doit = TRUE;    /*     * TODO - Device is transferring data, but there is no     * upstream module connected to receive it.  Lets log     * a message about incoming data being lost.  Buts lets     * do this only once we don't want a 'flood' of logged     * messages.     */    if (doit)	{	printf ("Dummy rxCallback: 0x%x 0x%x\n",		(int)callbackArg, (int)data);	doit = FALSE;	}    return;    }/********************************************************************************* dummyErrCallback - dummy Error callback routine** There should be an sioLib module to provide dummyCallbacks for all SIO* drivers to use.** RETURNS: N/A.* ARGSUSED*/LOCAL void dummyErrCallback    (    void * callbackArg,	/* argument registered with callback */    int errorCode, 	/* error code */    void * pData,	/* ptr to device specific data */    int size		/* size of device specific data */    )    {    static BOOL doit = TRUE;    /* TODO -  We could log the reported error (once). */    if (doit)	{	printf ("Dummy errorCallback: 0x%x 0x%x 0x%x %d\n",		(int)callbackArg, errorCode, (int)pData, size);	doit = FALSE;	}    return;    }/********************************************************************************* i82550Probe - probe for device ** Try to determine if device is present.  Do not reconfigure device if it* is there.  This should be a passive probe that does not interfere with* the device.** RETURNS:* Returns OK if device adaptor is there, ERROR if not there.*/LOCAL STATUS i82550Probe    (    I82550_CHAN * pChan /* channel to probe */    )    {    char testData;    /*     * TODO - Probe device registers to see if they are there and if they     * are the proper type of device.  Look for specific bits that are     * always 0 or 1.  Don't attempt any operations with side effects     * that might clear interrupt status or flags.  For High Availability     * situations, some other CPU may be controlling this device. We do     * not want to interfere with those operations.     */    I82550_PROBE (pChan, I82550_CSR_ID, VX_READ, 1, &testData);    /* TODO - Is this really the right type device ? */    return OK;    }/********************************************************************************* i82550Verify - verify i82550 chan structure** Given a pointer to what should be a I82550_CHAN, verify that it really* is a I82550_CHAN structure.** This routine should not be called at every level with every routine.  It is* primarily provided for use with the xxxDestroy routine.  Performance will be* a problem if every pointer is checked for validity with every use.** RETURNS:* Returns OK if pointer is valid, ERROR if not.*/LOCAL STATUS i82550Verify    (    I82550_CHAN * pChan /* pointer to be verified */    )    {    /*     * TODO - Examine the structure. Look for magic cookies or flag bits.     * Anything that would confirm this pointer as being a valid     * I82550_CHAN pointer.     */    if (pChan == NULL)	return ERROR;    return OK;    }#if 1 /* TODO - Optional modem control line support *//********************************************************************************* i82550MstatGet - read device modem control line status** Read the device modem control lines and map them to the standard* modem signal bits.** RETURNS:* Returns the modem control line status bits.*/LOCAL int i82550MstatGet    (    I82550_CHAN *pChan    )    {    UINT8 rawStatus;    int result = 0;    I82550_SIO_READ8 (pChan, I82550_MSR_ID, &rawStatus);    /* Now map device status bits, to standard status bits */    if (rawStatus & I82550_MSR_CD)	result |= SIO_MODEM_CD;    if (rawStatus & I82550_MSR_DTR)	result |= SIO_MODEM_DTR;    if (rawStatus & I82550_MSR_DSR)	result |= SIO_MODEM_DSR;    if (rawStatus & I82550_MSR_RTS)	result |= SIO_MODEM_RTS;    if (rawStatus & I82550_MSR_CTS)	result |= SIO_MODEM_CTS;    return result;    }/********************************************************************************* i82550MstatSetClear - set/clear modem control lines** This routine allows the user to set or clear individual modem control* lines.  Of course, only the output lines can actually be changed.** RETURNS:* OK, or EIO upon detecting a hardware fault.*/LOCAL int i82550MstatSetClr    (    I82550_CHAN *pChan,    UINT bits,		/* bits to change */    BOOL setFlag	/* TRUE = set, FALSE = clear */    )    {    UINT8 rawStatus;    UINT8 rawMask = 0;    /* Read current modem status */    I82550_SIO_READ8 (pChan, I82550_MSR_ID, &rawStatus);    /* ignore input only bits */    bits &= I82550_OSIG_MASK;    /* Now map standard bits to device specific bits */    if (bits & SIO_MODEM_DTR)	rawMask |= I82550_MSR_DTR;    if (bits & SIO_MODEM_RTS)	rawMask |= I82550_MSR_RTS;    /* Update device with new output signals */    if (setFlag)	rawStatus |= rawMask; /* set new bits */    else	rawStatus &= ~rawMask; /* clear bits */    I82550_SIO_WRITE8 (pChan, I82550_MSR_ID, rawStatus);    return OK;    }#endif /* optional modem control line support *//*********************************************************************************STATUS i82550Drv(void){	if(i82550DrvNum>0)return (OK);	if((i82550DrvNum=iosDrvInstall())==ERROR)		return (ERROR);	return (OK);}*/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品一区二区三区日韩| 色综合久久天天| 色老汉一区二区三区| 欧美一级久久久| 一区二区三区产品免费精品久久75| 日韩精品午夜视频| 色老汉一区二区三区| 国产日产欧美一区二区视频| 石原莉奈一区二区三区在线观看| av欧美精品.com| 久久久久久毛片| 免播放器亚洲一区| 日本国产一区二区| 成人免费在线视频| 成人av网址在线| 久久综合成人精品亚洲另类欧美 | 99国产精品久久久久久久久久久| 538在线一区二区精品国产| 中文字幕一区二区日韩精品绯色| 久久精品免费看| 欧美精三区欧美精三区| 日本欧美在线看| 欧美性感一区二区三区| 国产精品系列在线| 国产一区二区三区蝌蚪| 欧美一激情一区二区三区| 亚洲一区二区三区自拍| 色综合天天狠狠| 亚洲精品国产精品乱码不99| 99久久精品国产导航| 国产欧美视频在线观看| 国产激情视频一区二区三区欧美 | 亚洲欧美欧美一区二区三区| 成人午夜短视频| 国产精品免费久久久久| 成人精品视频网站| 国产精品久久久久久久久免费桃花 | 国产主播一区二区三区| 精品理论电影在线观看| 国产乱子轮精品视频| 欧美v日韩v国产v| 国产九九视频一区二区三区| 国产亚洲综合在线| 成人国产精品视频| 亚洲欧美偷拍另类a∨色屁股| 91美女福利视频| 亚洲高清不卡在线| 在线成人午夜影院| 久久www免费人成看片高清| 久久人人爽人人爽| 成人av影视在线观看| 一区二区三区国产精品| 在线不卡中文字幕播放| 国产最新精品精品你懂的| 久久久精品中文字幕麻豆发布| 风间由美一区二区av101| 亚洲人成在线播放网站岛国| 欧美日韩亚洲丝袜制服| 麻豆精品新av中文字幕| 国产丝袜欧美中文另类| 色一区在线观看| 免费久久99精品国产| 国产精品五月天| 精品视频色一区| 国产精品18久久久久久久网站| 国产精品久久久久久久久久久免费看 | 91老司机福利 在线| 性做久久久久久免费观看| 精品日韩一区二区| 色一情一伦一子一伦一区| 免费在线视频一区| 国产精品二三区| 欧美一区二区三区四区在线观看| 国产麻豆视频一区| 尤物视频一区二区| 国产午夜精品一区二区三区嫩草| 在线免费观看成人短视频| 久久精品久久久精品美女| 亚洲色大成网站www久久九九| 91精品国产乱码久久蜜臀| a在线欧美一区| 国内精品写真在线观看| 亚洲国产sm捆绑调教视频| 国产婷婷精品av在线| 91精品国产一区二区| 色综合一区二区| 国产麻豆精品久久一二三| 亚洲高清一区二区三区| 中文字幕精品一区| 精品国产电影一区二区| 欧美午夜电影在线播放| av在线一区二区| 国产91精品一区二区| 久久精品国产一区二区| 婷婷久久综合九色综合绿巨人| 国产精品麻豆网站| 久久久精品国产免费观看同学| 3d动漫精品啪啪一区二区竹菊| 色综合久久久久久久| 不卡的电影网站| 国产激情视频一区二区三区欧美| 美女网站在线免费欧美精品| 亚洲高清三级视频| 亚洲自拍偷拍图区| 亚洲精品日韩一| 亚洲日本在线a| 亚洲欧美日韩人成在线播放| 欧美韩国一区二区| 亚洲国产精品成人综合色在线婷婷 | 麻豆精品精品国产自在97香蕉| 亚洲成人在线免费| 日韩专区在线视频| 亚洲va欧美va人人爽| 亚洲午夜在线视频| 亚洲国产精品一区二区尤物区| 亚洲靠逼com| 亚洲综合色噜噜狠狠| 亚洲宅男天堂在线观看无病毒| 亚洲黄色性网站| 亚洲午夜久久久久久久久电影网| 亚洲另类在线制服丝袜| 亚洲资源在线观看| 天天色天天操综合| 看电视剧不卡顿的网站| 激情综合五月婷婷| 国产激情偷乱视频一区二区三区| 懂色av一区二区三区蜜臀| av资源网一区| 欧美亚洲动漫制服丝袜| 欧美福利电影网| 久久综合中文字幕| 中文字幕av资源一区| ...av二区三区久久精品| 亚洲欧美色图小说| 日韩成人免费电影| 国产a区久久久| 日本高清不卡aⅴ免费网站| 欧美色区777第一页| 日韩美一区二区三区| 亚洲国产精品成人综合 | 91在线精品一区二区| av成人老司机| 欧美电影在哪看比较好| 久久女同性恋中文字幕| 亚洲色图视频免费播放| 日韩av一区二区在线影视| 国产一区二区三区电影在线观看| 99国产精品久久久久| 5月丁香婷婷综合| 国产精品网曝门| 日韩国产高清影视| 国产成人av影院| 欧美日韩精品电影| 国产人成一区二区三区影院| 亚洲天堂成人在线观看| 日本亚洲免费观看| 99久久777色| 精品乱人伦小说| 亚洲国产sm捆绑调教视频 | 国产精品久线观看视频| 亚洲福利一区二区三区| 国产成a人亚洲精| 欧美日韩一区高清| 中日韩免费视频中文字幕| 日本女人一区二区三区| 一本到高清视频免费精品| 久久久久综合网| 男女男精品网站| 欧美在线999| 国产精品五月天| 国产曰批免费观看久久久| 欧美午夜理伦三级在线观看| 欧美国产1区2区| 国产一区欧美二区| 8x8x8国产精品| 一区二区三区91| 97aⅴ精品视频一二三区| 欧美精品一区二区三区蜜桃视频| 亚洲福中文字幕伊人影院| 91免费看片在线观看| 国产清纯在线一区二区www| 日产精品久久久久久久性色| 日本精品一级二级| 18欧美乱大交hd1984| 成人黄色电影在线| 国产精品女人毛片| 丰满少妇久久久久久久| 亚洲精品一区二区精华| 免费久久精品视频| 欧美一区二区在线播放| 亚洲成年人网站在线观看| 色婷婷av一区二区三区gif| 国产精品久久毛片av大全日韩| 国产一区二区女| 国产婷婷色一区二区三区四区| 国产美女av一区二区三区| 久久久久国色av免费看影院| 国产乱码精品一区二区三区av | 久久精品国产精品亚洲红杏| 91麻豆精品国产91久久久久久久久 |