PS2SDK
PS2 Homebrew Libraries
tty.c File Reference
#include "kernel.h"
#include "deci2.h"
+ Include dependency graph for tty.c:

Go to the source code of this file.

Data Structures

struct  tty_packet
 
struct  tty_queue
 
struct  tinfo
 

Macros

#define READ_ONCE(x)   (*(const volatile typeof(x) *)(&x))
 
#define WRITE_ONCE(x, val)   (*(volatile typeof(x) *)(&x) = (val))
 

Functions

static struct tty_packet wbuf __attribute__ ((aligned(16)))
 
static struct tty_queueQueueInit ()
 
static int QueueEmpty (struct tty_queue *q)
 
static void QueuePush (struct tty_queue *q, char c)
 
static char QueuePop (struct tty_queue *q)
 
void sceTtyHandler (int event, int param, void *opt)
 
int sceTtyWrite (char *buf, int len)
 
int sceTtyRead (char *buf, int len)
 
int sceTtyInit ()
 

Variables

int ttyinit = 0
 
struct tinfo tinfo
 

Detailed Description

DECI2 TTY

Definition in file tty.c.


Data Structure Documentation

◆ tty_packet

struct tty_packet

Definition at line 23 of file tty.c.

Data Fields
u16 length
u16 reserved
u16 protocol
u8 source
u8 destination
u32 ttyp_reserved
char buf[256]

◆ tty_queue

struct tty_queue

Definition at line 40 of file tty.c.

Data Fields
u32 read
u32 write
char buf[256]

◆ tinfo

struct tinfo

Definition at line 47 of file tty.c.

+ Collaboration diagram for tinfo:
Data Fields
int socket
int wlen
int rlen
int writing
char * wptr
char * rptr
struct tty_queue * read_queue