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...)   printf("%s: " format, _irx_id.n, ##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_transfer_reset (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_flag
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... 
)    printf("%s: " format, _irx_id.n, ##args)

Definition at line 50 of file sio2man.c.

◆ NANO_STATIC

#define NANO_STATIC

Definition at line 70 of file sio2man.c.

Function Documentation

◆ sio2_ctrl_set()

NANO_STATIC void sio2_ctrl_set ( u32  val)

Definition at line 73 of file sio2man.c.

◆ sio2_ctrl_get()

NANO_STATIC u32 sio2_ctrl_get ( void  )

Definition at line 80 of file sio2man.c.

◆ sio2_stat6c_get()

NANO_STATIC u32 sio2_stat6c_get ( void  )

Definition at line 87 of file sio2man.c.

◆ sio2_portN_ctrl1_set()

NANO_STATIC void sio2_portN_ctrl1_set ( int  N,
u32  val 
)

Definition at line 94 of file sio2man.c.

◆ sio2_portN_ctrl1_get()

u32 sio2_portN_ctrl1_get ( int  N)

Definition at line 102 of file sio2man.c.

◆ sio2_portN_ctrl2_set()

NANO_STATIC void sio2_portN_ctrl2_set ( int  N,
u32  val 
)

Definition at line 110 of file sio2man.c.

◆ sio2_portN_ctrl2_get()

u32 sio2_portN_ctrl2_get ( int  N)

Definition at line 118 of file sio2man.c.

◆ sio2_stat70_get()

u32 sio2_stat70_get ( void  )

Definition at line 126 of file sio2man.c.

◆ sio2_regN_set()

NANO_STATIC void sio2_regN_set ( int  N,
u32  val 
)

Definition at line 133 of file sio2man.c.

◆ sio2_regN_get()

u32 sio2_regN_get ( int  N)

Definition at line 141 of file sio2man.c.

◆ sio2_stat74_get()

NANO_STATIC u32 sio2_stat74_get ( void  )

Definition at line 149 of file sio2man.c.

◆ sio2_unkn78_set()

void sio2_unkn78_set ( u32  val)

Definition at line 157 of file sio2man.c.

◆ sio2_unkn78_get()

u32 sio2_unkn78_get ( void  )

Definition at line 166 of file sio2man.c.

◆ sio2_unkn7c_set()

void sio2_unkn7c_set ( u32  val)

Definition at line 175 of file sio2man.c.

◆ sio2_unkn7c_get()

u32 sio2_unkn7c_get ( void  )

Definition at line 184 of file sio2man.c.

◆ sio2_data_out()

NANO_STATIC void sio2_data_out ( u8  val)

Definition at line 192 of file sio2man.c.

◆ sio2_data_in()

NANO_STATIC u8 sio2_data_in ( void  )

Definition at line 199 of file sio2man.c.

◆ sio2_stat_set()

NANO_STATIC void sio2_stat_set ( u32  val)

Definition at line 206 of file sio2man.c.

◆ sio2_stat_get()

NANO_STATIC u32 sio2_stat_get ( void  )

Definition at line 213 of file sio2man.c.

◆ send_td()

static void send_td ( sio2_transfer_data_t td)
static

Definition at line 220 of file sio2man.c.

◆ recv_td()

static void recv_td ( sio2_transfer_data_t td)
static

Definition at line 269 of file sio2man.c.

◆ sio2_intr_handler()

static int sio2_intr_handler ( const struct sio2man_internal_data arg)
static

Definition at line 290 of file sio2man.c.

◆ _start()

int _start ( int  ac,
char **  av 
)

Definition at line 297 of file sio2man.c.

◆ _deinit()

void _deinit ( )

Definition at line 346 of file sio2man.c.

◆ sio2_set_intr_handler()

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

Definition at line 370 of file sio2man.c.

◆ sio2_set_ctrl_c()

NANO_STATIC void sio2_set_ctrl_c ( void  )

Definition at line 384 of file sio2man.c.

◆ sio2_set_ctrl_1()

NANO_STATIC void sio2_set_ctrl_1 ( void  )

Definition at line 390 of file sio2man.c.

◆ sio2_wait_for_intr()

void sio2_wait_for_intr ( void  )

Definition at line 396 of file sio2man.c.

◆ sio2_transfer()

int sio2_transfer ( sio2_transfer_data_t td)

Definition at line 401 of file sio2man.c.

◆ sio2_pad_transfer_init()

void sio2_pad_transfer_init ( void  )

Definition at line 419 of file sio2man.c.

◆ sio2_pad_transfer_init_possiblysdk13x()

void sio2_pad_transfer_init_possiblysdk13x ( void  )

Definition at line 431 of file sio2man.c.

◆ sio2_transfer_reset()

void sio2_transfer_reset ( void  )

Definition at line 437 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 446 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 451 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 456 of file sio2man.c.

◆ sio2_mtap_update_slots_set()

void sio2_mtap_update_slots_set ( sio2_mtap_update_slots_t  cb)

Definition at line 461 of file sio2man.c.

◆ sio2_mtap_change_slot()

int sio2_mtap_change_slot ( s32 *  arg)

Definition at line 466 of file sio2man.c.

◆ sio2_mtap_get_slot_max()

int sio2_mtap_get_slot_max ( int  port)

Definition at line 483 of file sio2man.c.

◆ sio2_mtap_get_slot_max2()

int sio2_mtap_get_slot_max2 ( int  port)

Definition at line 488 of file sio2man.c.

◆ sio2_mtap_update_slots()

void sio2_mtap_update_slots ( void  )

Definition at line 493 of file sio2man.c.

Variable Documentation

◆ g_sio2man_data

struct sio2man_internal_data g_sio2man_data
static

Definition at line 52 of file sio2man.c.