 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
sakya
Joined: 28 Apr 2006 Posts: 190
|
Posted: Thu Sep 27, 2007 7:56 pm Post subject: Activating USB in a kernel mode prx (CF 3.52)? |
|
|
Hi! :)
I'm experiencing problems activating usb in a prx (kernel mode) under CF 3.52 update 4.
I've always activated USB with this code (taken from the sdk sample):
| Code: | int USBinit(){
u32 retVal;
//start necessary drivers
LoadStartModule("flash0:/kd/semawm.prx");
LoadStartModule("flash0:/kd/usbstor.prx");
LoadStartModule("flash0:/kd/usbstormgr.prx");
LoadStartModule("flash0:/kd/usbstorms.prx");
LoadStartModule("flash0:/kd/usbstorboot.prx");
//setup USB drivers
retVal = sceUsbStart(PSP_USBBUS_DRIVERNAME, 0, 0);
if (retVal != 0) {
return -1;
}
retVal = sceUsbStart(PSP_USBSTOR_DRIVERNAME, 0, 0);
if (retVal != 0) {
return -1;
}
retVal = sceUsbstorBootSetCapacity(0x800000);
if (retVal != 0) {
return -1;
}
return 0;
} |
and then
| Code: | int USBActivate(){
sceUsbActivate(0x1c8);
return 0;
} |
This code seems to fail in my prx.
The prx doesen't even load and start (returning "Library not found").
The prx loads fine if I comment all the sceUSB* functions.
What's wrong?
Many thanks. :)
Ciaooo
Sakya |
|
| Back to top |
|
 |
septem
Joined: 29 Aug 2007 Posts: 21
|
Posted: Fri Sep 28, 2007 4:42 am Post subject: |
|
|
| I had the same problem, you need to remove one of the libs that are used in makefile, I guess that was one of -lpspusb... you must try for yourself- delete any that's not necessary to compile. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|