963037786f
Implement a stripped down termios, obtained from various files in musl and HOST_ or host_ prepended to most things and a few unavoidable style tweaks. Only implements the bits of termios we need for the boot loader: put the terminal into raw mode, restore terminal settings and speed stuff. Sponsored by: Netflix
25 lines
608 B
C
25 lines
608 B
C
#ifndef _TERMIOS_H
|
|
#define _TERMIOS_H
|
|
|
|
typedef unsigned char host_cc_t;
|
|
typedef unsigned int host_speed_t;
|
|
typedef unsigned int host_tcflag_t;
|
|
|
|
#define HOST_NCCS 32
|
|
|
|
#include "termios_arch.h"
|
|
|
|
#define HOST_TCSANOW 0
|
|
#define HOST_TCSADRAIN 1
|
|
#define HOST_TCSAFLUSH 2
|
|
|
|
int host_tcgetattr (int, struct host_termios *);
|
|
int host_tcsetattr (int, int, const struct host_termios *);
|
|
|
|
void host_cfmakeraw(struct host_termios *);
|
|
int host_cfsetispeed(struct host_termios *, host_speed_t);
|
|
int host_cfsetospeed(struct host_termios *, host_speed_t);
|
|
int host_cfsetspeed(struct host_termios *, host_speed_t);
|
|
|
|
#endif
|