mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-02-25 10:29:00 +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
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* 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;
|
package se.sics.cooja.contikimote.interfaces;
|
||||||
@ -159,7 +159,6 @@ public class ContikiRS232 extends SerialUI implements ContikiMoteInterface, Poll
|
|||||||
pendingBytes.add(b);
|
pendingBytes.add(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
mote.scheduleImmediateWakeup();
|
|
||||||
if (pendingBytesEvent != null) {
|
if (pendingBytesEvent != null) {
|
||||||
/* Event is already scheduled, no need to reschedule */
|
/* Event is already scheduled, no need to reschedule */
|
||||||
return;
|
return;
|
||||||
@ -197,6 +196,7 @@ public class ContikiRS232 extends SerialUI implements ContikiMoteInterface, Poll
|
|||||||
|
|
||||||
/* Reschedule us if more bytes are available */
|
/* Reschedule us if more bytes are available */
|
||||||
mote.getSimulation().scheduleEvent(this, t);
|
mote.getSimulation().scheduleEvent(this, t);
|
||||||
|
mote.scheduleImmediateWakeup();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
mote.getSimulation().scheduleEvent(
|
mote.getSimulation().scheduleEvent(
|
||||||
@ -208,7 +208,6 @@ public class ContikiRS232 extends SerialUI implements ContikiMoteInterface, Poll
|
|||||||
public void writeByte(final byte b) {
|
public void writeByte(final byte b) {
|
||||||
pendingBytes.add(b);
|
pendingBytes.add(b);
|
||||||
|
|
||||||
mote.scheduleImmediateWakeup();
|
|
||||||
if (pendingBytesEvent != null) {
|
if (pendingBytesEvent != null) {
|
||||||
/* Event is already scheduled, no need to reschedule */
|
/* Event is already scheduled, no need to reschedule */
|
||||||
return;
|
return;
|
||||||
@ -246,6 +245,7 @@ public class ContikiRS232 extends SerialUI implements ContikiMoteInterface, Poll
|
|||||||
|
|
||||||
/* Reschedule us if more bytes are available */
|
/* Reschedule us if more bytes are available */
|
||||||
mote.getSimulation().scheduleEvent(this, t);
|
mote.getSimulation().scheduleEvent(this, t);
|
||||||
|
mote.scheduleImmediateWakeup();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
mote.getSimulation().scheduleEvent(
|
mote.getSimulation().scheduleEvent(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user