Skip to content

Commit

Permalink
test2
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoan Hoang committed Jan 19, 2017
1 parent 3a50ab3 commit 7032bc4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ARM/Nordic/nRF52/EHAL/src/i2c_nrf52.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,12 @@ int nRF52I2CTxData(SERINTRFDEV *pDev, uint8_t *pData, int DataLen)
if (nRF52I2CWaitTxComplete(dev, 100000) == false)
break;

int rtry = 1000;

do {
l = dev->pReg->TXD.AMOUNT;
} while (l <= 0 && rtry-- > 0);

DataLen -= l;
pData += l;
cnt += l;
Expand Down

0 comments on commit 7032bc4

Please sign in to comment.