mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Update I2C_Wrapper.cpp
This commit is contained in:
@@ -112,7 +112,7 @@ bool FRToSI2C::wakePart(uint16_t DevAddress) {
|
|||||||
|
|
||||||
I2C_Transfer_Cfg i2cCfg = {0, DISABLE, 0, 0, 0, 0};
|
I2C_Transfer_Cfg i2cCfg = {0, DISABLE, 0, 0, 0, 0};
|
||||||
BL_Err_Type err = ERROR;
|
BL_Err_Type err = ERROR;
|
||||||
i2cCfg.slaveAddr = DevAddress;
|
i2cCfg.slaveAddr = DevAddress >> 1;
|
||||||
i2cCfg.stopEveryByte = DISABLE;
|
i2cCfg.stopEveryByte = DISABLE;
|
||||||
i2cCfg.subAddr = 0;
|
i2cCfg.subAddr = 0;
|
||||||
i2cCfg.dataSize = 0;
|
i2cCfg.dataSize = 0;
|
||||||
@@ -120,6 +120,7 @@ bool FRToSI2C::wakePart(uint16_t DevAddress) {
|
|||||||
i2cCfg.subAddrSize = 0; // one byte address
|
i2cCfg.subAddrSize = 0; // one byte address
|
||||||
|
|
||||||
err = I2C_MasterReceiveBlocking(I2C0_ID, &i2cCfg);
|
err = I2C_MasterReceiveBlocking(I2C0_ID, &i2cCfg);
|
||||||
|
MSG((char *)"I2C wakePart %02X - %d\r\n", DevAddress, err);
|
||||||
bool res = err == SUCCESS;
|
bool res = err == SUCCESS;
|
||||||
if (!res) {
|
if (!res) {
|
||||||
I2C_Unstick();
|
I2C_Unstick();
|
||||||
|
|||||||
Reference in New Issue
Block a user