18 lines
412 B
C
18 lines
412 B
C
#ifndef _SERIALPORT_H_
|
|
#define _SERIALPORT_H_
|
|
|
|
#include "tty.h"
|
|
#define PORT 0x3f8 // COM1
|
|
#define SERIAL_BUF_SIZE 256
|
|
|
|
|
|
int init_serial();
|
|
char read_serial();
|
|
void write_serial(char a);
|
|
void serial_tty_init_i(NTTY* tty);
|
|
void serial_tty_init_o(NTTY* tty);
|
|
int serial_tty_read(NTTY* tty, char* buf, int nr);
|
|
void serial_tty_write(NTTY* tty, char ch);
|
|
void serial_tty_rcevbuf(NTTY* tty, char ch);
|
|
|
|
#endif |