ps2sdk
1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
|
Go to the source code of this file.
Macros | |
#define | SIO_LCR 0x1000f100 |
#define | SIO_LCR_UMODE_8BIT 0x00 |
#define | SIO_LCR_UMODE_7BIT 0x01 |
#define | SIO_LCR_USBL_1BIT 0x00 |
#define | SIO_LCR_USBL_2BITS 0x01 |
#define | SIO_LCR_UPEN_OFF 0x00 |
#define | SIO_LCR_UPEN_ON 0x01 |
#define | SIO_LCR_UEPS_ODD 0x00 |
#define | SIO_LCR_UEPS_EVEN 0x01 |
#define | SIO_LSR 0x1000f110 |
#define | SIO_LSR_DR 0x01 |
#define | SIO_LSR_OE 0x02 |
#define | SIO_LSR_PE 0x04 |
#define | SIO_LSR_FE 0x08 |
#define | SIO_IER 0x1000f120 |
#define | SIO_IER_ERDAI 0x01 |
#define | SIO_IER_ELSI 0x04 |
#define | SIO_ISR 0x1000f130 |
#define | SIO_ISR_RX_DATA 0x01 |
#define | SIO_ISR_TX_EMPTY 0x02 |
#define | SIO_ISR_RX_ERROR 0x04 |
#define | SIO_FCR 0x1000f140 |
#define | SIO_FCR_FRSTE 0x01 |
#define | SIO_FCR_RFRST 0x02 |
#define | SIO_FCR_TFRST 0x04 |
#define | SIO_BGR 0x1000f150 |
#define | SIO_TXFIFO 0x1000f180 |
#define | SIO_RXFIFO 0x1000f1c0 |
#define | SIO_CAUSE_BIT (1 << 12) |
Functions | |
void | sio_init (u32 baudrate, u8 lcr_ueps, u8 lcr_upen, u8 lcr_usbl, u8 lcr_umode) |
int | sio_putc (int c) |
int | sio_getc (void) |
int | sio_getc_block (void) |
size_t | sio_write (void *buf, size_t size) |
size_t | sio_read (void *buf, size_t size) |
int | sio_puts (const char *str) |
int | sio_putsn (const char *str) |
char * | sio_gets (char *str) |
void | sio_flush (void) |
EE Serial I/O
Definition in file sio.h.
#define SIO_CAUSE_BIT (1 << 12) |
#define SIO_IER_ERDAI 0x01 |
void sio_flush | ( | void | ) |
Flushes the input buffer.
Referenced by sior_rpc_server().
int sio_getc | ( | void | ) |
Referenced by sior_rpc_server().
int sio_getc_block | ( | void | ) |
Same as sio_getc, but blocking. Note that getc should be blocking by default. Ho well.
Referenced by sior_rpc_server().
char* sio_gets | ( | char * | str | ) |
Will block until it recieves
or \r.
Referenced by sior_rpc_server().
Referenced by sior_rpc_server().
int sio_putc | ( | int | c | ) |
Referenced by sior_rpc_server().
int sio_puts | ( | const char * | str | ) |
Referenced by sior_rpc_server().
int sio_putsn | ( | const char * | str | ) |
Referenced by sior_rpc_server().
size_t sio_read | ( | void * | buf, |
size_t | size | ||
) |
This will read from the serial port until size characters have been read or EOF (RX FIFO is empty).
Referenced by sior_rpc_server().
size_t sio_write | ( | void * | buf, |
size_t | size | ||
) |
Not really much to do in the way of error-handling. sio_putc() already checks to see if there's room in the TX FIFO, and my cable doesn't support hardware flow control.
Referenced by sior_rpc_server().