X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Fchips%2Fmsp430%2Fusci%2FMsp430SpiP.nc;h=dfdf5afd635089b30c5076deae08baa4aa14a245;hb=9fca058256aebefdb8c274b66fa320df1ab951a4;hp=84878dd17b75f6b90aa37ceefe808109034b9153;hpb=c28d328ba709f9c9bb81d6985ade01abdbba0560;p=tinyos-2.x.git diff --git a/tos/chips/msp430/usci/Msp430SpiP.nc b/tos/chips/msp430/usci/Msp430SpiP.nc index 84878dd1..dfdf5afd 100644 --- a/tos/chips/msp430/usci/Msp430SpiP.nc +++ b/tos/chips/msp430/usci/Msp430SpiP.nc @@ -160,9 +160,9 @@ implementation { if (isBusy()) return 0; else { - while (!call Registers.getIfgTx()); + while (!call Registers.getIfgTx() && !call Registers.getCtl1(UCSWRST)); call Registers.setTxbuf(byte); - while(!call Registers.getIfgRx()); + while(!call Registers.getIfgRx() && !call Registers.getCtl1(UCSWRST)); return call Registers.getRxbuf(); } }