Exemple #1
0
/*
 *  シリアルI/Oポート割込みハンドラ
 */
void sio_handler(void)
{
	int port;

	for(port = 0; port < TNUM_PORT; ++ port)
	{
		if(BITTEST(siopcb_table[port].Flag, SIO_STA_OPEN))
		{
				/* 受信完了割込み */
			if(BITTEST(siopcb_table[port].Flag, SIO_STA_INTRCV))
			{
					/* 受信した文字を取り出し */
				BITCLEAR(siopcb_table[port].Flag, SIO_STA_INTRCV);
				sio_ierdy_rcv(GET_SIOPCB(ID_PORT(port))->exinf);

			}

				/* 送信完了割込み */
			if(BITTEST(siopcb_table[port].Flag, SIO_STA_INTSND))
			{
				BITCLEAR(siopcb_table[port].Flag, SIO_STA_INTSND);
				sio_ierdy_snd(GET_SIOPCB(ID_PORT(port))->exinf);
			}
		}
	}
}
Exemple #2
0
void sio_handler_in(void)
{
	int port;

	for(port = 0; port < TNUM_PORT; ++ port)
	{
		if( hw_port_getready(&siopcb_table[port]) == TRUE )
			sio_ierdy_rcv(GET_SIOPCB(ID_PORT(port))->exinf);
	}
}
Exemple #3
0
void sio_handler_out(void)
{
	int port;

	for(port = 0; port < TNUM_PORT; ++ port)
	{
		if((siopcb_table[port].flags & SIO_STS_SENDING) != 0)
		{
			/* 送信ステータス初期化 */
			sil_wrb_mem((void *)(SIOCR(port)+2), 0x1);
			siopcb_table[port].flags &= ~SIO_STS_SENDING;

			sio_ierdy_snd(GET_SIOPCB(ID_PORT(port))->exinf);
		}
	}
}