Lines Matching refs:cp
314 static void rp_do_receive(struct r_port *info, CHANNEL_t *cp, in rp_do_receive() argument
321 ToRecv = sGetRxCnt(cp); in rp_do_receive()
339 sEnRxStatusMode(cp); in rp_do_receive()
356 CharNStat = sInW(sGetTxRxDataIO(cp)); in rp_do_receive()
386 if (sGetRxCnt(cp) == 0) { in rp_do_receive()
390 sDisRxStatusMode(cp); in rp_do_receive()
409 sInStrW(sGetTxRxDataIO(cp), (unsigned short *) cbuf, wRecv); in rp_do_receive()
411 cbuf[ToRecv - 1] = sInB(sGetTxRxDataIO(cp)); in rp_do_receive()
426 CHANNEL_t *cp = &info->channel; in rp_do_transmit() local
444 info->xmit_fifo_room = TXFIFO_SIZE - sGetTxCnt(cp); in rp_do_transmit()
454 sOutStrW(sGetTxRxDataIO(cp), (unsigned short *) (info->xmit_buf + info->xmit_tail), c / 2); in rp_do_transmit()
456 sOutB(sGetTxRxDataIO(cp), info->xmit_buf[info->xmit_tail + c - 1]); in rp_do_transmit()
492 CHANNEL_t *cp; in rp_handle_port() local
504 cp = &info->channel; in rp_handle_port()
506 IntMask = sGetChanIntID(cp) & info->intmask; in rp_handle_port()
510 ChanStatus = sGetChanStatus(cp); in rp_handle_port()
512 rp_do_receive(info, cp, ChanStatus); in rp_handle_port()
712 CHANNEL_t *cp; in configure_r_port() local
715 cp = &info->channel; in configure_r_port()
720 sSetData8(cp); in configure_r_port()
723 sSetData7(cp); in configure_r_port()
727 sSetStop2(cp); in configure_r_port()
730 sSetStop1(cp); in configure_r_port()
734 sEnParity(cp); in configure_r_port()
737 sSetOddParity(cp); in configure_r_port()
739 sSetEvenParity(cp); in configure_r_port()
742 sDisParity(cp); in configure_r_port()
761 sSetBaud(cp, divisor); in configure_r_port()
768 sEnCTSFlowCtl(cp); in configure_r_port()
771 sDisCTSFlowCtl(cp); in configure_r_port()
777 if (sGetChanStatus(cp) & CD_ACT) in configure_r_port()
790 sEnTxSoftFlowCtl(cp); in configure_r_port()
792 sEnIXANY(cp); in configure_r_port()
794 sDisIXANY(cp); in configure_r_port()
796 sSetTxXONChar(cp, START_CHAR(tty)); in configure_r_port()
797 sSetTxXOFFChar(cp, STOP_CHAR(tty)); in configure_r_port()
799 sDisTxSoftFlowCtl(cp); in configure_r_port()
800 sDisIXANY(cp); in configure_r_port()
801 sClrTxXOFF(cp); in configure_r_port()
834 sEnRTSToggle(cp); in configure_r_port()
836 sDisRTSToggle(cp); in configure_r_port()
840 if (cp->CtlP->boardType == ROCKET_TYPE_PC104) { in configure_r_port()
843 sSetInterfaceMode(cp, InterfaceModeRS485); in configure_r_port()
846 sSetInterfaceMode(cp, InterfaceModeRS422); in configure_r_port()
851 sSetInterfaceMode(cp, InterfaceModeRS232T); in configure_r_port()
853 sSetInterfaceMode(cp, InterfaceModeRS232); in configure_r_port()
886 CHANNEL_t *cp; in rp_open() local
925 cp = &info->channel; in rp_open()
926 sSetRxTrigger(cp, TRIG_1); in rp_open()
927 if (sGetChanStatus(cp) & CD_ACT) in rp_open()
931 sDisRxStatusMode(cp); in rp_open()
932 sFlushRxFIFO(cp); in rp_open()
933 sFlushTxFIFO(cp); in rp_open()
935 sEnInterrupts(cp, (TXINT_EN | MCINT_EN | RXINT_EN | SRCINT_EN | CHANINT_EN)); in rp_open()
936 sSetRxTrigger(cp, TRIG_1); in rp_open()
938 sGetChanStatus(cp); in rp_open()
939 sDisRxStatusMode(cp); in rp_open()
940 sClrTxXOFF(cp); in rp_open()
942 sDisCTSFlowCtl(cp); in rp_open()
943 sDisTxSoftFlowCtl(cp); in rp_open()
945 sEnRxFIFO(cp); in rp_open()
946 sEnTransmit(cp); in rp_open()
964 sSetDTR(cp); in rp_open()
965 sSetRTS(cp); in rp_open()
989 CHANNEL_t *cp; in rp_close() local
1002 cp = &info->channel; in rp_close()
1008 timeout = (sGetTxCnt(cp) + 1) * HZ / info->cps; in rp_close()
1014 sDisTransmit(cp); in rp_close()
1015 sDisInterrupts(cp, (TXINT_EN | MCINT_EN | RXINT_EN | SRCINT_EN | CHANINT_EN)); in rp_close()
1016 sDisCTSFlowCtl(cp); in rp_close()
1017 sDisTxSoftFlowCtl(cp); in rp_close()
1018 sClrTxXOFF(cp); in rp_close()
1019 sFlushRxFIFO(cp); in rp_close()
1020 sFlushTxFIFO(cp); in rp_close()
1021 sClrRTS(cp); in rp_close()
1023 sClrDTR(cp); in rp_close()
1067 CHANNEL_t *cp; in rp_set_termios() local
1086 cp = &info->channel; in rp_set_termios()
1090 sClrDTR(cp); in rp_set_termios()
1091 sClrRTS(cp); in rp_set_termios()
1096 sSetRTS(cp); in rp_set_termios()
1097 sSetDTR(cp); in rp_set_termios()
1346 CHANNEL_t *cp; in rp_send_xchar() local
1351 cp = &info->channel; in rp_send_xchar()
1352 if (sGetTxCnt(cp)) in rp_send_xchar()
1353 sWriteTxPrioByte(cp, ch); in rp_send_xchar()
1355 sWriteTxByte(sGetTxRxDataIO(cp), ch); in rp_send_xchar()
1438 CHANNEL_t *cp; in rp_wait_until_sent() local
1446 cp = &info->channel; in rp_wait_until_sent()
1455 txcnt = sGetTxCnt(cp); in rp_wait_until_sent()
1457 if (sGetChanStatusLo(cp) & TXSHRMT) in rp_wait_until_sent()
1491 CHANNEL_t *cp; in rp_hangup() local
1510 cp = &info->channel; in rp_hangup()
1511 sDisRxFIFO(cp); in rp_hangup()
1512 sDisTransmit(cp); in rp_hangup()
1513 sDisInterrupts(cp, (TXINT_EN | MCINT_EN | RXINT_EN | SRCINT_EN | CHANINT_EN)); in rp_hangup()
1514 sDisCTSFlowCtl(cp); in rp_hangup()
1515 sDisTxSoftFlowCtl(cp); in rp_hangup()
1516 sClrTxXOFF(cp); in rp_hangup()
1532 CHANNEL_t *cp; in rp_put_char() local
1549 cp = &info->channel; in rp_put_char()
1552 info->xmit_fifo_room = TXFIFO_SIZE - sGetTxCnt(cp); in rp_put_char()
1560 sOutB(sGetTxRxDataIO(cp), ch); in rp_put_char()
1579 CHANNEL_t *cp; in rp_write() local
1593 cp = &info->channel; in rp_write()
1596 info->xmit_fifo_room = TXFIFO_SIZE - sGetTxCnt(cp); in rp_write()
1607 sOutStrW(sGetTxRxDataIO(cp), (unsigned short *) b, c / 2); in rp_write()
1611 sOutB(sGetTxRxDataIO(cp), b[c - 1]); in rp_write()
1711 CHANNEL_t *cp; in rp_flush_buffer() local
1726 cp = &info->channel; in rp_flush_buffer()
1727 sFlushTxFIFO(cp); in rp_flush_buffer()