mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
I2C wake part workaround
This commit is contained in:
@@ -43,7 +43,7 @@ bool FRToSI2C::Mem_Read(uint16_t DevAddress, uint16_t read_address, uint8_t *p_b
|
||||
i2cCfg.subAddrSize = 1; // one byte address
|
||||
|
||||
err = I2C_MasterReceiveBlocking(I2C0_ID, &i2cCfg);
|
||||
MSG((char *)"I2C Mem_Read %02X - %d - %d\r\n", DevAddress >> 1, err, number_of_byte);
|
||||
// MSG((char *)"I2C Mem_Read %02X - %d - %d\r\n", DevAddress >> 1, err, number_of_byte);
|
||||
bool res = err == SUCCESS;
|
||||
if (!res) {
|
||||
I2C_Unstick();
|
||||
@@ -66,7 +66,7 @@ bool FRToSI2C::Mem_Write(uint16_t DevAddress, uint16_t MemAddress, uint8_t *p_bu
|
||||
i2cCfg.subAddrSize = 1; // one byte address
|
||||
|
||||
err = I2C_MasterSendBlocking(I2C0_ID, &i2cCfg);
|
||||
MSG((char *)"I2C Mem_Write %02X - %d\r\n", DevAddress >> 1, err);
|
||||
// MSG((char *)"I2C Mem_Write %02X - %d\r\n", DevAddress >> 1, err);
|
||||
bool res = err == SUCCESS;
|
||||
if (!res) {
|
||||
I2C_Unstick();
|
||||
@@ -107,7 +107,6 @@ bool FRToSI2C::writeRegistersBulk(const uint8_t address, const I2C_REG *register
|
||||
|
||||
bool FRToSI2C::wakePart(uint16_t DevAddress) {
|
||||
// wakepart is a special case where only the device address is sent
|
||||
return false; // TODO
|
||||
|
||||
if (!lock()) {
|
||||
return false;
|
||||
@@ -129,6 +128,6 @@ bool FRToSI2C::wakePart(uint16_t DevAddress) {
|
||||
I2C_Unstick();
|
||||
}
|
||||
unlock();
|
||||
MSG((char *)"I2C probe done \r\n");
|
||||
// MSG((char *)"I2C probe done \r\n");
|
||||
return res;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -896,7 +896,6 @@ void startGUITask(void const *argument) {
|
||||
|
||||
for (;;) {
|
||||
ButtonState buttons = getButtonState();
|
||||
MSG((char *)"Buttons %d\r\n", int(buttons));
|
||||
if (buttons != BUTTON_NONE) {
|
||||
OLED::setDisplayState(OLED::DisplayState::ON);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user