PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
main.c
1#define MAJOR_VER 1
2#define MINOR_VER 1
3
4#include "scsi.h"
5#include <irx.h>
6#include <loadcore.h>
7#include <stdio.h>
8
9// #define DEBUG //comment out this line when not debugging
10#include "module_debug.h"
11
12IRX_ID(MODNAME, MAJOR_VER, MINOR_VER);
13
14extern int usb_mass_init(void);
15
16int _start(int argc, char *argv[])
17{
18 (void)argc;
19 (void)argv;
20
21 M_PRINTF("USB MASS Driver v%d.%d\n", MAJOR_VER, MINOR_VER);
22
23 // initialize the SCSI driver
24 if (scsi_init() != 0) {
25 M_PRINTF("ERROR: initializing SCSI driver!\n");
26 return MODULE_NO_RESIDENT_END;
27 }
28
29 // initialize the USB driver
30 if (usb_mass_init() != 0) {
31 M_PRINTF("ERROR: initializing USB driver!\n");
32 return MODULE_NO_RESIDENT_END;
33 }
34
35 // return resident
36 return MODULE_RESIDENT_END;
37}