__sfr __at 0xf8 cpld_status;
__sfr __at 0xf9 cpld_data;
-static char tbuf1[TTYSIZ];
-static char tbuf2[TTYSIZ];
-static char tbuf3[TTYSIZ];
-static char tbuf4[TTYSIZ];
-static char tbuf5[TTYSIZ];
+static uint8_t tbuf1[TTYSIZ];
+static uint8_t tbuf2[TTYSIZ];
+static uint8_t tbuf3[TTYSIZ];
+static uint8_t tbuf4[TTYSIZ];
+static uint8_t tbuf5[TTYSIZ];
static uint8_t sleeping;
0x02 /* 115200 */
};
-static void sio2_setup(uint8_t minor, uint8_t flags)
+static void sio2_setup(uint_fast8_t minor, uint_fast8_t flags)
{
struct termios *t = &ttydata[minor].termios;
uint8_t r;
sio_r[5] = 0x8A | ((t->c_cflag & CSIZE) << 1);
}
-void tty_setup(uint8_t minor, uint8_t flags)
+void tty_setup(uint_fast8_t minor, uint_fast8_t flags)
{
if (minor == 1)
return;
}
}
-int tty_carrier(uint8_t minor)
+int tty_carrier(uint_fast8_t minor)
{
uint8_t c;
uint8_t port;
tty_inproc(1, cpld_data);
}
-void tty_putc(uint8_t minor, unsigned char c)
+void tty_putc(uint_fast8_t minor, uint_fast8_t c)
{
if (minor == 1) {
irqflags_t irq = di();
}
/* We will need this for SIO once we implement flow control signals */
-void tty_sleeping(uint8_t minor)
+void tty_sleeping(uint_fast8_t minor)
{
sleeping |= (1 << minor);
}
Need to review this we should be ok as the IRQ handler always leaves
us pointing at RR0 */
-ttyready_t tty_writeready(uint8_t minor)
+ttyready_t tty_writeready(uint_fast8_t minor)
{
irqflags_t irq;
uint8_t c;
return TTY_READY_SOON;
}
-void tty_data_consumed(uint8_t minor)
+void tty_data_consumed(uint_fast8_t minor)
{
used(minor);
}
/* kernel writes to system console -- never sleep! */
-void kputchar(char c)
+void kputchar(uint_fast8_t c)
{
/* Always use the bitbang port - no need for write waits therefore */
if (c == '\n')
tty_putc(TTYDEV - 512, c);
}
-int rctty_open(uint8_t minor, uint16_t flag)
+int rctty_open(uint_fast8_t minor, uint16_t flag)
{
if ((minor == 2 || minor == 3) && !sio_present) {
udata.u_error = ENODEV;
#ifndef __DEVTTY_DOT_H__
#define __DEVTTY_DOT_H__
-void tty_putc(uint8_t minor, unsigned char c);
+void tty_putc(uint_fast8_t minor, uint_fast8_t c);
void tty_pollirq_sio0(void);
void tty_pollirq_sio1(void);
void tty_poll_cpld(void);
-int rctty_open(uint8_t minor, uint16_t flag);
+int rctty_open(uint_fast8_t minor, uint16_t flag);
#endif