Karg  v0.2.0
The kernel of CargOS
tty.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <drivers/ldisc.h>
4 #include <sync/sem.h>
5 
6 typedef struct {
9  usize rx_head, rx_tail;
12 
14 extern const driver_t TTY_DRIVER;
15 
#define DRIVER_DEV_CAPACITY
Definition: config.h:5
Definition: driver.h:5
Definition: ldisc.h:6
Definition: sem.h:5
Definition: tty.h:6
u8 * rx_buf
Definition: tty.h:8
usize rx_head
Definition: tty.h:9
ldisc_ctrl_blk_t ldisc_ctrl_blk
Definition: tty.h:7
sem_t rx_sem
Definition: tty.h:10
const driver_t TTY_DRIVER
Definition: tty.c:28
i32 tty_init_ctrl_blk(tty_ctrl_blk_t *ctrl_blk)
Definition: tty.c:33
tty_ctrl_blk_t * tty_ctrl_blks[DRIVER_DEV_CAPACITY]
Definition: tty.c:6
__INT32_TYPE__ i32
Definition: types.h:15
__UINTPTR_TYPE__ usize
Definition: types.h:28
__UINT8_TYPE__ u8
Definition: types.h:3