Exemple #1
0
/*
 *  シリアルI/Oポートからの文字受信
 */
INT
upd72001_rcv_chr(SIOPCB *siopcb)
{
	if (upd72001_getready(siopcb)) {
		return((INT)(UB) upd72001_getchar(siopcb));
	}
	return(-1);
}
Exemple #2
0
/*
 *  シリアルI/Oポートからの文字受信
 */
int_t
upd72001_rcv_chr(SIOPCB *p_siopcb)
{
	if (upd72001_getready(p_siopcb)) {
		return((int_t)(uint8_t) upd72001_getchar(p_siopcb));
	}
	return(-1);
}
Exemple #3
0
/*
 *  シリアルI/Oポートに対する割込み処理
 */
static void
upd72001_isr_siop(SIOPCB *siopcb)
{
	if ((siopcb->cr1 & CR1_RECV) != 0 && upd72001_getready(siopcb)) {
		/*
		 *  受信通知コールバックルーチンを呼び出す.
		 */
		upd72001_ierdy_rcv(siopcb->exinf);
	}
	if ((siopcb->cr1 & CR1_SEND) != 0 && upd72001_putready(siopcb)) {
		/*
		 *  送信可能コールバックルーチンを呼び出す.
		 */
		upd72001_ierdy_snd(siopcb->exinf);
	}
}