mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
schedule wakeup after new data has been written
This commit is contained in:
parent
244d780809
commit
4c4cdeb546
@ -26,7 +26,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: ContikiRS232.java,v 1.9 2009/05/26 14:24:20 fros4943 Exp $
|
||||
* $Id: ContikiRS232.java,v 1.10 2009/06/15 14:40:28 fros4943 Exp $
|
||||
*/
|
||||
|
||||
package se.sics.cooja.contikimote.interfaces;
|
||||
@ -159,7 +159,6 @@ public class ContikiRS232 extends SerialUI implements ContikiMoteInterface, Poll
|
||||
pendingBytes.add(b);
|
||||
}
|
||||
|
||||
mote.scheduleImmediateWakeup();
|
||||
if (pendingBytesEvent != null) {
|
||||
/* Event is already scheduled, no need to reschedule */
|
||||
return;
|
||||
@ -197,6 +196,7 @@ public class ContikiRS232 extends SerialUI implements ContikiMoteInterface, Poll
|
||||
|
||||
/* Reschedule us if more bytes are available */
|
||||
mote.getSimulation().scheduleEvent(this, t);
|
||||
mote.scheduleImmediateWakeup();
|
||||
}
|
||||
};
|
||||
mote.getSimulation().scheduleEvent(
|
||||
@ -208,7 +208,6 @@ public class ContikiRS232 extends SerialUI implements ContikiMoteInterface, Poll
|
||||
public void writeByte(final byte b) {
|
||||
pendingBytes.add(b);
|
||||
|
||||
mote.scheduleImmediateWakeup();
|
||||
if (pendingBytesEvent != null) {
|
||||
/* Event is already scheduled, no need to reschedule */
|
||||
return;
|
||||
@ -246,6 +245,7 @@ public class ContikiRS232 extends SerialUI implements ContikiMoteInterface, Poll
|
||||
|
||||
/* Reschedule us if more bytes are available */
|
||||
mote.getSimulation().scheduleEvent(this, t);
|
||||
mote.scheduleImmediateWakeup();
|
||||
}
|
||||
};
|
||||
mote.getSimulation().scheduleEvent(
|
||||
|
Loading…
Reference in New Issue
Block a user