| View previous topic :: View next topic |
| Author |
Message |
realjoeeye1
Joined: 30 Aug 2008 Posts: 20
|
Posted: Sat Mar 07, 2009 5:17 pm Post subject: How to use the "sceI2cMasterTransmit" function in |
|
|
Sys:5.00M33
I want to send datas to the I2C bus, so I made an I2Csend.prx and loaded it in my programme to use my functions in kernel mode.The function:
int I2Csend(u8 a,u8 b)
{
u8 param1[4];
param1[0]=a;
param1[1]=b;
int k1 = pspSdkSetK1(0);
int res=sceI2cMasterTransmit(0x42, param1, 2);
pspSdkSetK1(k1);
return res;
}
But when I called this function, my programme recieved an 8002013A err code, what's wrong?
(The pspi2c_driver.a was already there.) |
|
| Back to top |
|
 |
Pirata Nervo
Joined: 09 Oct 2007 Posts: 409
|
Posted: Sun Mar 08, 2009 6:24 am Post subject: |
|
|
That means the library was is not linked. So you must load the .prx file that has sceI2cMasterTransmit() to be able to run that function _________________
Upgrade your PSP |
|
| Back to top |
|
 |
Dariusc123456
Joined: 12 Aug 2008 Posts: 394
|
Posted: Sun Mar 08, 2009 11:56 am Post subject: |
|
|
| What prx or library are you loading it from. |
|
| Back to top |
|
 |
realjoeeye1
Joined: 30 Aug 2008 Posts: 20
|
Posted: Mon Mar 09, 2009 12:24 am Post subject: |
|
|
| Dariusc123456 wrote: | | What prx or library are you loading it from. |
It's in the libpspi2c_driver.a that already in my pspsdk.
Is that means after compile and link, my prx also need to load another prx that contain this function?
Or the function is already linked from libpspi2c_driver.a to my prx?
I found this function in DA's DVE driver decompiled. |
|
| Back to top |
|
 |
realjoeeye1
Joined: 30 Aug 2008 Posts: 20
|
Posted: Mon Mar 09, 2009 2:19 am Post subject: |
|
|
!_!
I just bricked my PSP......
I "cut" the clockgen.prx from flash0 to my computer......
Holly shit! |
|
| Back to top |
|
 |
Dariusc123456
Joined: 12 Aug 2008 Posts: 394
|
Posted: Wed Mar 11, 2009 5:02 am Post subject: |
|
|
Why are you in the flash? Can you get to the recovery menu?
Try to add to the makefile "LIB = -lpspi2c_driver"?[/url] |
|
| Back to top |
|
 |
NoEffex
Joined: 27 Nov 2008 Posts: 108
|
Posted: Wed Mar 11, 2009 4:44 pm Post subject: |
|
|
| Dariusc123456 wrote: | Why are you in the flash? Can you get to the recovery menu?
Try to add to the makefile "LIB = -lpspi2c_driver"?[/url] | He has the library loaded compiler-side, just not prx-side, similar as if you were to try to make a usb connection with none of the usb modules loaded.
I'd borrow loadstartmodule from psplink and load the module that way(When you figure out which one it is). _________________ Programming with:
Geany + Latest PSPSDK from svn |
|
| Back to top |
|
 |
realjoeeye1
Joined: 30 Aug 2008 Posts: 20
|
Posted: Thu Mar 12, 2009 12:54 pm Post subject: |
|
|
| NoEffex wrote: | | Dariusc123456 wrote: | Why are you in the flash? Can you get to the recovery menu?
Try to add to the makefile "LIB = -lpspi2c_driver"?[/url] | He has the library loaded compiler-side, just not prx-side, similar as if you were to try to make a usb connection with none of the usb modules loaded.
I'd borrow loadstartmodule from psplink and load the module that way(When you figure out which one it is). |
I think it's in the clockgen.prx, so I tried to copy it to my computer and do some test, but I used "cut" instead "copy" so my PSP is bricked......
(My PSP is recovered from brick last night, with help of pandora.) |
|
| Back to top |
|
 |
|