mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 05:32:47 +00:00
Fixed I2C_init() code (thanks @profi200)
This commit is contained in:
parent
f157dcd542
commit
7d0a133d00
@ -15,6 +15,7 @@
|
||||
#include "rtc.h"
|
||||
#include "power.h"
|
||||
#include "vram0.h"
|
||||
#include "i2c.h"
|
||||
|
||||
|
||||
#define N_PANES 2
|
||||
@ -1782,6 +1783,7 @@ u32 GodMode(int entrypoint) {
|
||||
return exit_mode;
|
||||
}
|
||||
|
||||
I2C_init();
|
||||
InitSDCardFS();
|
||||
AutoEmuNandBase(true);
|
||||
InitNandCrypto(entrypoint != ENTRY_B9S);
|
||||
@ -2291,6 +2293,7 @@ u32 ScriptRunner(int entrypoint) {
|
||||
SplashInit("scriptrunner mode");
|
||||
u64 timer = timer_start();
|
||||
|
||||
I2C_init();
|
||||
InitSDCardFS();
|
||||
AutoEmuNandBase(true);
|
||||
InitNandCrypto(entrypoint != ENTRY_B9S);
|
||||
|
@ -136,15 +136,15 @@ static bool i2cStartTransfer(I2cDevice devId, u8 regAddr, bool read, vu8 *regsBa
|
||||
|
||||
void I2C_init(void)
|
||||
{
|
||||
i2cWaitBusy(i2cGetBusRegsBase(0));
|
||||
i2cWaitBusy(i2cGetBusRegsBase(0) + 1);
|
||||
REG_I2C1_CNTEX = 2; // ?
|
||||
REG_I2C1_SCL = 1280; // ?
|
||||
|
||||
i2cWaitBusy(i2cGetBusRegsBase(1));
|
||||
i2cWaitBusy(i2cGetBusRegsBase(1) + 1);
|
||||
REG_I2C2_CNTEX = 2; // ?
|
||||
REG_I2C2_SCL = 1280; // ?
|
||||
|
||||
i2cWaitBusy(i2cGetBusRegsBase(2));
|
||||
i2cWaitBusy(i2cGetBusRegsBase(2) + 1);
|
||||
REG_I2C3_CNTEX = 2; // ?
|
||||
REG_I2C3_SCL = 1280; // ?
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user