Files
retrobsd/sys/include/uart.h
Serge Vakulenko 9c749994c1 Setup only UARTs, defined in the kernel config file.
For console initialization, use options CONS_MAJOR and CONS_MINOR.
2015-09-19 21:23:07 -07:00

29 lines
629 B
C

#ifndef _UART_H
#define _UART_H
#include "tty.h"
#define NUART 6
#ifdef KERNEL
#include "conf.h"
void uartinit(int unit);
int uartopen(dev_t dev, int flag, int mode);
int uartclose(dev_t dev, int flag, int mode);
int uartread(dev_t dev, struct uio * uio, int flag);
int uartwrite(dev_t dev, struct uio *uio, int flag);
int uartselect(dev_t dev, int rw);
int uartioctl(dev_t dev, u_int cmd, caddr_t addr, int flag);
void uartintr(dev_t dev);
void uartstart(struct tty *tp);
void uartputc(dev_t dev, char c);
char uartgetc(dev_t dev);
extern struct tty uartttys[NUART];
extern const struct devspec uartdevs[];
#endif
#endif