__sfr __at 41 tty2data;
__sfr __at 42 tty3stat;
__sfr __at 43 tty3data;
+__sfr __at 50 tty4stat;
+__sfr __at 51 tty4data;
char tbuf1[TTYSIZ];
char tbuf2[TTYSIZ];
char tbuf3[TTYSIZ];
+char tbuf4[TTYSIZ];
struct s_queue ttyinq[NUM_DEV_TTY+1] = { /* ttyinq[0] is never used */
{ NULL, NULL, NULL, 0, 0, 0 },
{ tbuf1, tbuf1, tbuf1, TTYSIZ, 0, TTYSIZ/2 },
{ tbuf2, tbuf2, tbuf2, TTYSIZ, 0, TTYSIZ/2 },
- { tbuf3, tbuf3, tbuf3, TTYSIZ, 0, TTYSIZ/2 }
+ { tbuf3, tbuf3, tbuf3, TTYSIZ, 0, TTYSIZ/2 },
+ { tbuf4, tbuf4, tbuf4, TTYSIZ, 0, TTYSIZ/2 }
};
static uint8_t ttypoll;
tty1data = c;
else if (minor == 2)
tty2data = c;
- else
+ else if (minor == 3)
tty3data = c;
+ else
+ tty4data = c;
}
void tty_sleeping(uint8_t minor)
c = tty3data;
tty_inproc(3, c);
}
+ while(tty4stat & 1) {
+ c = tty4data;
+ tty_inproc(3, c);
+ }
if ((ttypoll & 4) && (tty2stat & 2)) {
ttypoll &= ~4;
wakeup(&ttydata[2]);
ttypoll &= ~8;
wakeup(&ttydata[3]);
}
+ if ((ttypoll & 8) && (tty4stat & 2)) {
+ ttypoll &= ~8;
+ wakeup(&ttydata[4]);
+ }
}
void tty_setup(uint8_t minor)