quinn-os/tty_fs.h
2022-07-19 11:40:37 +10:00

19 lines
508 B
C

#ifndef __TTY_FS
#define __TTY_FS
#include "vfs.h"
#define TTY_BUF_SIZE 256
struct tty_dev_data {
int tty_buf_at;
char tty_buf[TTY_BUF_SIZE];
void (*tty_write)(char *data, int len);
uint8_t echo;
};
extern void tty_input(struct vfs_device_t *device, char c);
extern int tty_write_data(struct vfs_device_t *device, char *buffer, int len, int offset);
extern int tty_read_data(struct vfs_device_t *device, char *buffer, int len, int offset);
extern int tty_init(struct vfs_device_t *device);
#endif