Fix n3ds IPS screen issues/regression, closes #1236

This commit is contained in:
TuxSH 2019-04-05 00:04:38 +02:00
parent 63736d7873
commit af822e5af5

View File

@ -19,7 +19,7 @@
#include <stdbool.h> #include <stdbool.h>
#include "types.h" #include "types.h"
#include "i2c.h" #include "i2c.h"
#include "utils.h"
#define I2C1_REGS_BASE (0x10161000) #define I2C1_REGS_BASE (0x10161000)
@ -214,8 +214,10 @@ bool I2C_writeRegBuf(I2cDevice devId, u8 regAddr, const u8 *in, u32 size)
u8 I2C_readReg(I2cDevice devId, u8 regAddr) u8 I2C_readReg(I2cDevice devId, u8 regAddr)
{ {
// note: don't use it in itcm code
u8 data; u8 data;
if(!I2C_readRegBuf(devId, regAddr, &data, 1)) return 0xFF; if(!I2C_readRegBuf(devId, regAddr, &data, 1)) return 0xFF;
wait(3);
return data; return data;
} }