PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
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)
 
#define WRITE_ONCE(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

Macro Definition Documentation

◆ READ_ONCE

#define READ_ONCE ( x)
Value:
(*(const volatile typeof(x) *)(&x))

Definition at line 18 of file tty.c.

◆ WRITE_ONCE

#define WRITE_ONCE ( x,
val )
Value:
(*(volatile typeof(x) *)(&x) = (val))

Definition at line 19 of file tty.c.

Function Documentation

◆ __attribute__()

static struct tty_packet wbuf __attribute__ ( (aligned(16)) )
static

Definition at line 14 of file sifcmd.c.

◆ QueueInit()

static struct tty_queue * QueueInit ( )
static

Definition at line 58 of file tty.c.

◆ QueueEmpty()

static int QueueEmpty ( struct tty_queue * q)
static

Definition at line 71 of file tty.c.

◆ QueuePush()

static void QueuePush ( struct tty_queue * q,
char c )
static

Definition at line 76 of file tty.c.

◆ QueuePop()

static char QueuePop ( struct tty_queue * q)
static

Definition at line 84 of file tty.c.

◆ sceTtyHandler()

void sceTtyHandler ( int event,
int param,
void * opt )

Definition at line 95 of file tty.c.

◆ sceTtyWrite()

int sceTtyWrite ( char * buf,
int len )

Definition at line 135 of file tty.c.

◆ sceTtyRead()

int sceTtyRead ( char * buf,
int len )

Definition at line 190 of file tty.c.

◆ sceTtyInit()

int sceTtyInit ( )

Definition at line 207 of file tty.c.

Variable Documentation

◆ ttyinit

int ttyinit = 0

Definition at line 21 of file tty.c.