PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
sio2man.c File Reference
#include "irx_imports.h"
#include <iop_mmio_hwport.h>
#include <rsio2man.h>
+ Include dependency graph for sio2man.c:

Go to the source code of this file.

Data Structures

struct  sio2man_internal_data
 

Macros

#define EPRINTF(format, args...)
 
#define NANO_STATIC
 

Functions

 IRX_ID ("sio2man", 3, 17)
 
NANO_STATIC void sio2_ctrl_set (u32 val)
 
NANO_STATIC u32 sio2_ctrl_get (void)
 
NANO_STATIC u32 sio2_stat6c_get (void)
 
NANO_STATIC void sio2_portN_ctrl1_set (int N, u32 val)
 
u32 sio2_portN_ctrl1_get (int N)
 
NANO_STATIC void sio2_portN_ctrl2_set (int N, u32 val)
 
u32 sio2_portN_ctrl2_get (int N)
 
u32 sio2_stat70_get (void)
 
NANO_STATIC void sio2_regN_set (int N, u32 val)
 
u32 sio2_regN_get (int N)
 
NANO_STATIC u32 sio2_stat74_get (void)
 
void sio2_unkn78_set (u32 val)
 
u32 sio2_unkn78_get (void)
 
void sio2_unkn7c_set (u32 val)
 
u32 sio2_unkn7c_get (void)
 
NANO_STATIC void sio2_data_out (u8 val)
 
NANO_STATIC u8 sio2_data_in (void)
 
NANO_STATIC void sio2_stat_set (u32 val)
 
NANO_STATIC u32 sio2_stat_get (void)
 
static void send_td (sio2_transfer_data_t *td)
 
static void recv_td (sio2_transfer_data_t *td)
 
static int sio2_intr_handler (const struct sio2man_internal_data *arg)
 
int _start (int ac, char **av)
 
void _deinit ()
 
void sio2_set_intr_handler (int(*handler)(void *), void *userdata)
 
NANO_STATIC void sio2_set_ctrl_c ()
 
NANO_STATIC void sio2_set_ctrl_1 ()
 
void sio2_wait_for_intr ()
 
int sio2_transfer (sio2_transfer_data_t *td)
 
void sio2_pad_transfer_init (void)
 
void sio2_pad_transfer_init_possiblysdk13x (void)
 
void sio2_mc_transfer_init_possiblysdk13x (void)
 
void sio2_transfer_reset (void)
 
static int sio2_mtap_change_slot_default (s32 *arg)
 
static int sio2_mtap_get_slot_max_default (int port)
 
static void sio2_mtap_update_slots_default (void)
 
void sio2_mtap_change_slot_set (sio2_mtap_change_slot_cb_t cb)
 
void sio2_mtap_get_slot_max_set (sio2_mtap_get_slot_max_cb_t cb)
 
void sio2_mtap_get_slot_max2_set (sio2_mtap_get_slot_max2_cb_t cb)
 
void sio2_mtap_update_slots_set (sio2_mtap_update_slots_t cb)
 
int sio2_mtap_change_slot (s32 *arg)
 
int sio2_mtap_get_slot_max (int port)
 
int sio2_mtap_get_slot_max2 (int port)
 
void sio2_mtap_update_slots (void)
 

Variables

struct irx_export_table _exp_sio2man
 
struct irx_export_table _exp_sio2man1
 
static struct sio2man_internal_data g_sio2man_data
 

Detailed Description

SIO2 interface manager and logging utility.

Definition in file sio2man.c.


Data Structure Documentation

◆ sio2man_internal_data

struct sio2man_internal_data

Definition at line 36 of file sio2man.c.

Data Fields
int m_inited
int m_intr_sema
int m_transfer_semaphore
int m_sdk13x_curflag
int m_sdk13x_totalflag
sio2_mtap_change_slot_cb_t m_mtap_change_slot_cb
sio2_mtap_get_slot_max_cb_t m_mtap_get_slot_max_cb
sio2_mtap_get_slot_max2_cb_t m_mtap_get_slot_max2_cb
sio2_mtap_update_slots_t m_mtap_update_slots_cb

Macro Definition Documentation

◆ EPRINTF

#define EPRINTF ( format,
args... )
Value:
printf("%s: " format, _irx_id.n, ##args)

Definition at line 51 of file sio2man.c.

◆ NANO_STATIC

#define NANO_STATIC

Definition at line 71 of file sio2man.c.

Function Documentation

◆ sio2_ctrl_set()

NANO_STATIC void sio2_ctrl_set ( u32 val)

Definition at line 74 of file sio2man.c.

◆ sio2_ctrl_get()

NANO_STATIC u32 sio2_ctrl_get ( void )

Definition at line 81 of file sio2man.c.

◆ sio2_stat6c_get()

NANO_STATIC u32 sio2_stat6c_get ( void )

Definition at line 88 of file sio2man.c.

◆ sio2_portN_ctrl1_set()

NANO_STATIC void sio2_portN_ctrl1_set ( int N,
u32 val )

Definition at line 95 of file sio2man.c.

◆ sio2_portN_ctrl1_get()

u32 sio2_portN_ctrl1_get ( int N)

Definition at line 103 of file sio2man.c.

◆ sio2_portN_ctrl2_set()

NANO_STATIC void sio2_portN_ctrl2_set ( int N,
u32 val )

Definition at line 111 of file sio2man.c.

◆ sio2_portN_ctrl2_get()

u32 sio2_portN_ctrl2_get ( int N)

Definition at line 119 of file sio2man.c.

◆ sio2_stat70_get()

u32 sio2_stat70_get ( void )

Definition at line 127 of file sio2man.c.

◆ sio2_regN_set()

NANO_STATIC void sio2_regN_set ( int N,
u32 val )

Definition at line 134 of file sio2man.c.

◆ sio2_regN_get()

u32 sio2_regN_get ( int N)

Definition at line 142 of file sio2man.c.

◆ sio2_stat74_get()

NANO_STATIC u32 sio2_stat74_get ( void )

Definition at line 150 of file sio2man.c.

◆ sio2_unkn78_set()

void sio2_unkn78_set ( u32 val)

Definition at line 158 of file sio2man.c.

◆ sio2_unkn78_get()

u32 sio2_unkn78_get ( void )

Definition at line 167 of file sio2man.c.

◆ sio2_unkn7c_set()

void sio2_unkn7c_set ( u32 val)

Definition at line 176 of file sio2man.c.

◆ sio2_unkn7c_get()

u32 sio2_unkn7c_get ( void )

Definition at line 185 of file sio2man.c.

◆ sio2_data_out()

NANO_STATIC void sio2_data_out ( u8 val)

Definition at line 193 of file sio2man.c.

◆ sio2_data_in()

NANO_STATIC u8 sio2_data_in ( void )

Definition at line 200 of file sio2man.c.

◆ sio2_stat_set()

NANO_STATIC void sio2_stat_set ( u32 val)

Definition at line 207 of file sio2man.c.

◆ sio2_stat_get()

NANO_STATIC u32 sio2_stat_get ( void )

Definition at line 214 of file sio2man.c.

◆ send_td()

static void send_td ( sio2_transfer_data_t * td)
static

Definition at line 221 of file sio2man.c.

◆ recv_td()

static void recv_td ( sio2_transfer_data_t * td)
static

Definition at line 270 of file sio2man.c.

◆ sio2_intr_handler()

static int sio2_intr_handler ( const struct sio2man_internal_data * arg)
static

Definition at line 291 of file sio2man.c.

◆ _start()

int _start ( int ac,
char ** av )

Definition at line 298 of file sio2man.c.

◆ _deinit()

void _deinit ( )

Definition at line 349 of file sio2man.c.

◆ sio2_set_intr_handler()

void sio2_set_intr_handler ( int(* handler )(void *),
void * userdata )

Definition at line 373 of file sio2man.c.

◆ sio2_set_ctrl_c()

NANO_STATIC void sio2_set_ctrl_c ( void )

Definition at line 387 of file sio2man.c.

◆ sio2_set_ctrl_1()

NANO_STATIC void sio2_set_ctrl_1 ( void )

Definition at line 393 of file sio2man.c.

◆ sio2_wait_for_intr()

void sio2_wait_for_intr ( void )

Definition at line 399 of file sio2man.c.

◆ sio2_transfer()

int sio2_transfer ( sio2_transfer_data_t * td)

Definition at line 404 of file sio2man.c.

◆ sio2_pad_transfer_init()

void sio2_pad_transfer_init ( void )

Definition at line 422 of file sio2man.c.

◆ sio2_pad_transfer_init_possiblysdk13x()

void sio2_pad_transfer_init_possiblysdk13x ( void )

Definition at line 434 of file sio2man.c.

◆ sio2_mc_transfer_init_possiblysdk13x()

void sio2_mc_transfer_init_possiblysdk13x ( void )

Definition at line 440 of file sio2man.c.

◆ sio2_transfer_reset()

void sio2_transfer_reset ( void )

Definition at line 446 of file sio2man.c.

◆ sio2_mtap_change_slot_default()

static int sio2_mtap_change_slot_default ( s32 * arg)
static

Definition at line 455 of file sio2man.c.

◆ sio2_mtap_get_slot_max_default()

static int sio2_mtap_get_slot_max_default ( int port)
static

Definition at line 469 of file sio2man.c.

◆ sio2_mtap_update_slots_default()

static void sio2_mtap_update_slots_default ( void )
static

Definition at line 474 of file sio2man.c.

◆ sio2_mtap_change_slot_set()

void sio2_mtap_change_slot_set ( sio2_mtap_change_slot_cb_t cb)

Definition at line 476 of file sio2man.c.

◆ sio2_mtap_get_slot_max_set()

void sio2_mtap_get_slot_max_set ( sio2_mtap_get_slot_max_cb_t cb)

Definition at line 482 of file sio2man.c.

◆ sio2_mtap_get_slot_max2_set()

void sio2_mtap_get_slot_max2_set ( sio2_mtap_get_slot_max2_cb_t cb)

Definition at line 488 of file sio2man.c.

◆ sio2_mtap_update_slots_set()

void sio2_mtap_update_slots_set ( sio2_mtap_update_slots_t cb)

Definition at line 494 of file sio2man.c.

◆ sio2_mtap_change_slot()

int sio2_mtap_change_slot ( s32 * arg)

Definition at line 500 of file sio2man.c.

◆ sio2_mtap_get_slot_max()

int sio2_mtap_get_slot_max ( int port)

Definition at line 507 of file sio2man.c.

◆ sio2_mtap_get_slot_max2()

int sio2_mtap_get_slot_max2 ( int port)

Definition at line 513 of file sio2man.c.

◆ sio2_mtap_update_slots()

void sio2_mtap_update_slots ( void )

Definition at line 519 of file sio2man.c.

Variable Documentation

◆ g_sio2man_data

struct sio2man_internal_data g_sio2man_data
static

Definition at line 53 of file sio2man.c.