This function appears to be borked on New 3DS

This commit is contained in:
Aurora 2016-11-14 01:01:53 +01:00
parent abf3017eb2
commit 2938bbd11f
3 changed files with 0 additions and 27 deletions

View File

@ -115,31 +115,6 @@ static bool i2cSelectRegister(u8 bus_id, u8 reg)
//-----------------------------------------------------------------------------
u8 i2cReadRegister(u8 dev_id, u8 reg)
{
u8 bus_id = i2cGetDeviceBusId(dev_id),
dev_addr = i2cGetDeviceRegAddr(dev_id);
for(u32 i = 0; i < 8; i++)
{
if(i2cSelectDevice(bus_id, dev_addr) && i2cSelectRegister(bus_id, reg))
{
if(i2cSelectDevice(bus_id, dev_addr | 1))
{
i2cWaitBusy(bus_id);
i2cStop(bus_id, 1);
i2cWaitBusy(bus_id);
return *i2cGetDataReg(bus_id);
}
}
*i2cGetCntReg(bus_id) = 0xC5;
i2cWaitBusy(bus_id);
}
return 0xFF;
}
bool i2cWriteRegister(u8 dev_id, u8 reg, u8 data)
{
u8 bus_id = i2cGetDeviceBusId(dev_id),

View File

@ -41,5 +41,4 @@
#define I2C_DEV_GYRO 10
#define I2C_DEV_IR 13
u8 i2cReadRegister(u8 dev_id, u8 reg);
bool i2cWriteRegister(u8 dev_id, u8 reg, u8 data);

View File

@ -50,7 +50,6 @@ u32 waitInput(bool isMenu)
if(!key)
{
if(i2cReadRegister(I2C_DEV_MCU, 0x10) == 1) mcuPowerOff();
oldKey = key;
dPadDelay = 0;
}