RetroArch
Classes | Macros | Functions | Variables
physbusif.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#include <ogcsys.h>
#include <gccore.h>
#include <usb.h>
#include "hci.h"
#include "btmemb.h"
#include "physbusif.h"
Include dependency graph for physbusif.c:

Classes

struct  usbtxbuf
 

Macros

#define STACKSIZE   32768
 
#define NUM_ACL_BUFS   30
 
#define NUM_CTRL_BUFS   45
 
#define ACL_BUF_SIZE   1800
 
#define CTRL_BUF_SIZE   660
 
#define ROUNDUP32(v)   (((u32)(v)+0x1f)&~0x1f)
 
#define ROUNDDOWN32(v)   (((u32)(v)-0x1f)&~0x1f)
 

Functions

static u8 __ppc_btstack1 [STACKSIZEATTRIBUTE_ALIGN (8)
 
static s32 __issue_bulkread ()
 
static s32 __issue_intrread ()
 
u32 __IPC_ClntInit ()
 
static s32 __usb_closeCB (s32 result, void *usrdata)
 
static s32 __writectrlmsgCB (s32 result, void *usrdata)
 
static s32 __writebulkmsgCB (s32 result, void *usrdata)
 
static s32 __readbulkdataCB (s32 result, void *usrdata)
 
static s32 __readintrdataCB (s32 result, void *usrdata)
 
static s32 __initUsbIOBuffer (struct memb_blks *blk, u32 buf_size, u32 num_bufs)
 
static s32 __getDeviceId (u16 vid, u16 pid)
 
static s32 __usb_register (pbcallback cb)
 
static s32 __usb_open (pbcallback cb)
 
void __ntd_set_ohci (u8 hci)
 
void __ntd_set_pid_vid (u16 vid, u16 pid)
 
void physbusif_init ()
 
void physbusif_close ()
 
void physbusif_shutdown ()
 
void physbusif_reset_all ()
 
void physbusif_output (struct pbuf *p, u16_t len)
 

Variables

static u32 __ntd_ohci = 0
 
static u32 __ntd_ohci_initflag = 0
 
static u16 __ntd_vid = 0
 
static u16 __ntd_pid = 0
 
static u32 __ntd_vid_pid_specified = 0
 
static s32 __ntd_usb_fd = -1
 
static u32 __wait4hci = 1
 
static struct _usb_p __usbdev
 
static struct memb_blks ctrlbufs
 
static struct memb_blks aclbufs
 

Macro Definition Documentation

◆ ACL_BUF_SIZE

#define ACL_BUF_SIZE   1800

◆ CTRL_BUF_SIZE

#define CTRL_BUF_SIZE   660

◆ NUM_ACL_BUFS

#define NUM_ACL_BUFS   30

◆ NUM_CTRL_BUFS

#define NUM_CTRL_BUFS   45

◆ ROUNDDOWN32

#define ROUNDDOWN32 (   v)    (((u32)(v)-0x1f)&~0x1f)

◆ ROUNDUP32

#define ROUNDUP32 (   v)    (((u32)(v)+0x1f)&~0x1f)

◆ STACKSIZE

#define STACKSIZE   32768

Function Documentation

◆ __getDeviceId()

static s32 __getDeviceId ( u16  vid,
u16  pid 
)
static
Here is the caller graph for this function:

◆ __initUsbIOBuffer()

static s32 __initUsbIOBuffer ( struct memb_blks blk,
u32  buf_size,
u32  num_bufs 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __IPC_ClntInit()

u32 __IPC_ClntInit ( )
Here is the caller graph for this function:

◆ __issue_bulkread()

static s32 __issue_bulkread ( )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __issue_intrread()

static s32 __issue_intrread ( )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __ntd_set_ohci()

void __ntd_set_ohci ( u8  hci)

◆ __ntd_set_pid_vid()

void __ntd_set_pid_vid ( u16  vid,
u16  pid 
)

◆ __readbulkdataCB()

static s32 __readbulkdataCB ( s32  result,
void usrdata 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __readintrdataCB()

static s32 __readintrdataCB ( s32  result,
void usrdata 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __usb_closeCB()

static s32 __usb_closeCB ( s32  result,
void usrdata 
)
static
Here is the caller graph for this function:

◆ __usb_open()

static s32 __usb_open ( pbcallback  cb)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __usb_register()

static s32 __usb_register ( pbcallback  cb)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __writebulkmsgCB()

static s32 __writebulkmsgCB ( s32  result,
void usrdata 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __writectrlmsgCB()

static s32 __writectrlmsgCB ( s32  result,
void usrdata 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ATTRIBUTE_ALIGN()

static u8 __ppc_btstack1 [STACKSIZE] ATTRIBUTE_ALIGN ( )
static

◆ physbusif_close()

void physbusif_close ( )
Here is the caller graph for this function:

◆ physbusif_init()

void physbusif_init ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ physbusif_output()

void physbusif_output ( struct pbuf p,
u16_t  len 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ physbusif_reset_all()

void physbusif_reset_all ( )
Here is the caller graph for this function:

◆ physbusif_shutdown()

void physbusif_shutdown ( )
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ __ntd_ohci

u32 __ntd_ohci = 0
static

◆ __ntd_ohci_initflag

u32 __ntd_ohci_initflag = 0
static

◆ __ntd_pid

u16 __ntd_pid = 0
static

◆ __ntd_usb_fd

s32 __ntd_usb_fd = -1
static

◆ __ntd_vid

u16 __ntd_vid = 0
static

◆ __ntd_vid_pid_specified

u32 __ntd_vid_pid_specified = 0
static

◆ __usbdev

struct _usb_p __usbdev
static

◆ __wait4hci

u32 __wait4hci = 1
static

◆ aclbufs

struct memb_blks aclbufs
static

◆ ctrlbufs

struct memb_blks ctrlbufs
static