19 lines
508 B
C
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 |