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 (void *userdata)
 
int _start (int ac, char **av)
 
void _deinit ()
 
void sio2_set_intr_handler (int(*handler)(void *userdata), 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 ( void * userdata)
static

Definition at line 291 of file sio2man.c.

◆ _start()

int _start ( int ac,
char ** av )

Definition at line 301 of file sio2man.c.

◆ _deinit()

void _deinit ( )

Definition at line 352 of file sio2man.c.

◆ sio2_set_intr_handler()

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

Definition at line 376 of file sio2man.c.

◆ sio2_set_ctrl_c()

NANO_STATIC void sio2_set_ctrl_c ( void )

Definition at line 390 of file sio2man.c.

◆ sio2_set_ctrl_1()

NANO_STATIC void sio2_set_ctrl_1 ( void )

Definition at line 396 of file sio2man.c.

◆ sio2_wait_for_intr()

void sio2_wait_for_intr ( void )

Definition at line 402 of file sio2man.c.

◆ sio2_transfer()

int sio2_transfer ( sio2_transfer_data_t * td)

Definition at line 407 of file sio2man.c.

◆ sio2_pad_transfer_init()

void sio2_pad_transfer_init ( void )

Definition at line 425 of file sio2man.c.

◆ sio2_pad_transfer_init_possiblysdk13x()

void sio2_pad_transfer_init_possiblysdk13x ( void )

Definition at line 437 of file sio2man.c.

◆ sio2_mc_transfer_init_possiblysdk13x()

void sio2_mc_transfer_init_possiblysdk13x ( void )

Definition at line 443 of file sio2man.c.

◆ sio2_transfer_reset()

void sio2_transfer_reset ( void )

Definition at line 449 of file sio2man.c.

◆ sio2_mtap_change_slot_default()

static int sio2_mtap_change_slot_default ( s32 * arg)
static

Definition at line 458 of file sio2man.c.

◆ sio2_mtap_get_slot_max_default()

static int sio2_mtap_get_slot_max_default ( int port)
static

Definition at line 472 of file sio2man.c.

◆ sio2_mtap_update_slots_default()

static void sio2_mtap_update_slots_default ( void )
static

Definition at line 477 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 479 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 485 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 491 of file sio2man.c.

◆ sio2_mtap_update_slots_set()

void sio2_mtap_update_slots_set ( sio2_mtap_update_slots_t cb)

Definition at line 497 of file sio2man.c.

◆ sio2_mtap_change_slot()

int sio2_mtap_change_slot ( s32 * arg)

Definition at line 503 of file sio2man.c.

◆ sio2_mtap_get_slot_max()

int sio2_mtap_get_slot_max ( int port)

Definition at line 510 of file sio2man.c.

◆ sio2_mtap_get_slot_max2()

int sio2_mtap_get_slot_max2 ( int port)

Definition at line 516 of file sio2man.c.

◆ sio2_mtap_update_slots()

void sio2_mtap_update_slots ( void )

Definition at line 522 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.