sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
ps2dev9.c File Reference
#include <types.h>
#include <defs.h>
#include <loadcore.h>
#include <intrman.h>
#include <iomanX.h>
#include <dmacman.h>
#include <thbase.h>
#include <thsemap.h>
#include <stdio.h>
#include <sysclib.h>
#include <dev9.h>
#include <aifregs.h>
#include <dev9regs.h>
#include <speedregs.h>
#include <smapregs.h>

Go to the source code of this file.

Macros

#define MODNAME   "dev9"
#define DRIVERNAME   "dev9"
#define M_PRINTF(format, args...)
#define VERSION   "1.0"
#define BANNER   "\nDEV9 device driver v%s - Copyright (c) 2003 Marcus R. Brown\n\n"
#define SSBUS_R_1418   0xbf801418
#define SSBUS_R_141c   0xbf80141c
#define SSBUS_R_1420   0xbf801420

Typedefs

typedef int(*) dev9IntrDispatchCb_t(int flag)

Enumerations

enum  PC_CARD_TYPE { PC_CARD_TYPE_NONE = 0 , PC_CARD_TYPE_PCMCIA , PC_CARD_TYPE_CARDBUS }
enum  PC_CARD_VOLTAGE { PC_CARD_VOLTAGE_INVALID = 0 , PC_CARD_VOLTAGE_3V , PC_CARD_VOLTAGE_5V , PC_CARD_VOLTAGE_04h }

Functions

 IRX_ID (MODNAME, 2, 8)
 IOMANX_RETURN_VALUE_IMPL (0)
int _start (int argc, char *argv[])
int _exit (void)
void SpdRegisterIntrHandler (int intr, dev9_intr_cb_t cb)
void dev9RegisterPreDmaCb (int ctrl, dev9_dma_cb_t cb)
void dev9RegisterPostDmaCb (int ctrl, dev9_dma_cb_t cb)
void Dev9CardStop (void)
void SpdIntrEnable (int mask)
void SpdIntrDisable (int mask)
int SpdDmaTransfer (int device, void *buf, int bcr, int dir)
int SpdGetEthernetID (u16 *buf)
void SpdSetLED (int ctl)
void dev9LED2Ctl (int ctl)
void dev9ControlPIO3 (int ctl)
int Dev9RegisterPowerOffHandler (int idx, dev9_shutdown_cb_t cb)

Variables

struct irx_export_table _exp_dev9

Detailed Description

DEV9 Device Driver.

Definition in file ps2dev9.c.

Macro Definition Documentation

◆ BANNER

#define BANNER   "\nDEV9 device driver v%s - Copyright (c) 2003 Marcus R. Brown\n\n"

Definition at line 45 of file ps2dev9.c.

◆ DRIVERNAME

#define DRIVERNAME   "dev9"

Definition at line 37 of file ps2dev9.c.

◆ M_PRINTF

#define M_PRINTF ( format,
args... )
Value:
printf(MODNAME ": " format, ##args)

Definition at line 41 of file ps2dev9.c.

◆ MODNAME

#define MODNAME   "dev9"

Definition at line 36 of file ps2dev9.c.

◆ SSBUS_R_1418

#define SSBUS_R_1418   0xbf801418

Definition at line 48 of file ps2dev9.c.

◆ SSBUS_R_141c

#define SSBUS_R_141c   0xbf80141c

Definition at line 49 of file ps2dev9.c.

◆ SSBUS_R_1420

#define SSBUS_R_1420   0xbf801420

Definition at line 50 of file ps2dev9.c.

◆ VERSION

#define VERSION   "1.0"

Definition at line 44 of file ps2dev9.c.

Typedef Documentation

◆ dev9IntrDispatchCb_t

typedef int(*) dev9IntrDispatchCb_t(int flag)

Definition at line 79 of file ps2dev9.c.

Enumeration Type Documentation

◆ PC_CARD_TYPE

enum PC_CARD_TYPE

Definition at line 59 of file ps2dev9.c.

◆ PC_CARD_VOLTAGE

enum PC_CARD_VOLTAGE

Definition at line 65 of file ps2dev9.c.

Function Documentation

◆ _exit()

int _exit ( void )

Definition at line 272 of file ps2dev9.c.

◆ _start()

int _start ( int argc,
char * argv[] )

Definition at line 203 of file ps2dev9.c.

◆ Dev9CardStop()

void Dev9CardStop ( void )

Definition at line 368 of file ps2dev9.c.

◆ dev9ControlPIO3()

void dev9ControlPIO3 ( int ctl)

Definition at line 616 of file ps2dev9.c.

◆ dev9LED2Ctl()

void dev9LED2Ctl ( int ctl)

Definition at line 600 of file ps2dev9.c.

◆ dev9RegisterPostDmaCb()

void dev9RegisterPostDmaCb ( int ctrl,
dev9_dma_cb_t cb )

Definition at line 287 of file ps2dev9.c.

◆ Dev9RegisterPowerOffHandler()

int Dev9RegisterPowerOffHandler ( int idx,
dev9_shutdown_cb_t cb )

Definition at line 633 of file ps2dev9.c.

◆ dev9RegisterPreDmaCb()

void dev9RegisterPreDmaCb ( int ctrl,
dev9_dma_cb_t cb )

Definition at line 281 of file ps2dev9.c.

◆ SpdDmaTransfer()

int SpdDmaTransfer ( int device,
void * buf,
int bcr,
int dir )

Definition at line 431 of file ps2dev9.c.

◆ SpdGetEthernetID()

int SpdGetEthernetID ( u16 * buf)

Definition at line 560 of file ps2dev9.c.

◆ SpdIntrDisable()

void SpdIntrDisable ( int mask)

Definition at line 420 of file ps2dev9.c.

◆ SpdIntrEnable()

void SpdIntrEnable ( int mask)

Definition at line 409 of file ps2dev9.c.

◆ SpdRegisterIntrHandler()

void SpdRegisterIntrHandler ( int intr,
dev9_intr_cb_t cb )

Definition at line 275 of file ps2dev9.c.

◆ SpdSetLED()

void SpdSetLED ( int ctl)

Definition at line 588 of file ps2dev9.c.