sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
sior.h
Go to the documentation of this file.
1/*
2# _____ ___ ____ ___ ____
3# ____| | ____| | | |____|
4# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5#-----------------------------------------------------------------------
6# Copyright 2001-2004, ps2dev - http://www.ps2dev.org
7# Licenced under Academic Free License version 2.0
8# Review ps2sdk README & LICENSE files for further details.
9*/
10
16
17#ifndef __SIOR_H__
18#define __SIOR_H__
19
20#include <stdarg.h>
21#include <irx.h>
22
23#include <sior-common.h>
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29extern void sio_init(u32 baudrate, u8 lcr_ueps, u8 lcr_upen, u8 lcr_usbl, u8 lcr_umode);
30extern int sio_putc(int c);
31extern int sio_getc(void);
32extern int sio_getc_block(void);
33
34extern size_t sio_write(const char *buf, size_t size);
35extern size_t sio_read(char *buf, size_t size);
36
37extern int sio_puts(const char *str);
38extern int sio_putsn(const char *str); // no newline for this one
39extern char *sio_gets(char *str);
40
41extern void sio_flush(void);
42
43extern int sio_printf(const char *format, ...);
44extern int sio_vprintf(const char *format, va_list);
45
46#define sior_IMPORTS_start DECLARE_IMPORT_TABLE(sior, 1, 1)
47#define sior_IMPORTS_end END_IMPORT_TABLE
48
49#define I_sio_init DECLARE_IMPORT(4, sio_init)
50#define I_sio_putc DECLARE_IMPORT(5, sio_putc)
51#define I_sio_getc DECLARE_IMPORT(6, sio_getc)
52#define I_sio_getc_block DECLARE_IMPORT(7, sio_getc_block)
53#define I_sio_write DECLARE_IMPORT(8, sio_write)
54#define I_sio_read DECLARE_IMPORT(9, sio_read)
55#define I_sio_puts DECLARE_IMPORT(10, sio_puts)
56#define I_sio_putsn DECLARE_IMPORT(11, sio_putsn)
57#define I_sio_gets DECLARE_IMPORT(12, sio_gets)
58#define I_sio_flush DECLARE_IMPORT(13, sio_flush)
59#define I_sio_printf DECLARE_IMPORT(14, sio_printf)
60#define I_sio_vprintf DECLARE_IMPORT(15, sio_vprintf)
61
62#ifdef __cplusplus
63}
64#endif
65
66#endif /* __SIOR_H__ */
void sio_flush(void)
Definition sio.c:167
int sio_getc_block(void)
Definition sio.c:91
size_t sio_read(void *buf, size_t size)
Definition sio.c:110
char * sio_gets(char *str)
Definition sio.c:148
size_t sio_write(void *buf, size_t size)
Definition sio.c:99