feat: capability list to enable greater flexibility of devices
[lunaix-os.git] / lunaix-os / usr / libc / src / termios.c
diff --git a/lunaix-os/usr/libc/src/termios.c b/lunaix-os/usr/libc/src/termios.c
new file mode 100644 (file)
index 0000000..52c97e4
--- /dev/null
@@ -0,0 +1,22 @@
+#include <termios.h>
+#include <lunaix/ioctl.h>
+
+int
+tcgetattr(int fd, struct termios* termios_p) 
+{
+    return ioctl(fd, TDEV_TCGETATTR, termios_p);
+}
+
+
+int
+tcsendbreak(int fd, int ) 
+{
+    // TODO
+    return 0;
+}
+
+int
+tcsetattr(int fd, int optional_actions, const struct termios* termios_p)
+{
+    return ioctl(fd, TDEV_TCSETATTR, termios_p);
+}