From 34fd9f883bd9c804e0a9b171dcba28b91203d563 Mon Sep 17 00:00:00 2001 From: idgay Date: Wed, 23 May 2007 22:17:49 +0000 Subject: [PATCH] bit rot fixes --- tos/platforms/null/ActiveMessageC.nc | 6 ++++++ tos/platforms/null/PlatformLedsC.nc | 25 ++++++++++++++++++++++++ tos/platforms/null/PlatformSerialC.nc | 28 +++++++++++++++++++++------ 3 files changed, 53 insertions(+), 6 deletions(-) diff --git a/tos/platforms/null/ActiveMessageC.nc b/tos/platforms/null/ActiveMessageC.nc index 73893f8e..e42a46ad 100644 --- a/tos/platforms/null/ActiveMessageC.nc +++ b/tos/platforms/null/ActiveMessageC.nc @@ -92,6 +92,12 @@ implementation { command void AMPacket.setType(message_t* amsg, am_id_t t) { } + command am_addr_t AMPacket.source(message_t* amsg) { + return 0; + } + + command void AMPacket.setSource(message_t* amsg, am_addr_t addr) { } + command void* Receive.getPayload[uint8_t id](message_t* msg, uint8_t* len) { return NULL; } diff --git a/tos/platforms/null/PlatformLedsC.nc b/tos/platforms/null/PlatformLedsC.nc index c10e511c..722b43fe 100644 --- a/tos/platforms/null/PlatformLedsC.nc +++ b/tos/platforms/null/PlatformLedsC.nc @@ -81,4 +81,29 @@ implementation async command void Led2.makeOutput() { call Init.init(); } + + async command bool Led0.isInput() { + return FALSE; + } + + async command bool Led0.isOutput() { + return FALSE; + } + + async command bool Led1.isInput() { + return FALSE; + } + + async command bool Led1.isOutput() { + return FALSE; + } + + async command bool Led2.isInput() { + return FALSE; + } + + async command bool Led2.isOutput() { + return FALSE; + } + } diff --git a/tos/platforms/null/PlatformSerialC.nc b/tos/platforms/null/PlatformSerialC.nc index 94ff26b5..839d4e0d 100644 --- a/tos/platforms/null/PlatformSerialC.nc +++ b/tos/platforms/null/PlatformSerialC.nc @@ -13,24 +13,40 @@ */ module PlatformSerialC { - provides interface Init; provides interface StdControl; - provides interface SerialByteComm; + provides interface UartByte; + provides interface UartStream; } implementation { - async command error_t SerialByteComm.put(uint8_t data) { + command error_t StdControl.start() { return SUCCESS; } - command error_t Init.init() { + command error_t StdControl.stop() { return SUCCESS; } - command error_t StdControl.start() { + async command error_t UartByte.send( uint8_t byte ) { return SUCCESS; } - command error_t StdControl.stop() { + async command error_t UartByte.receive( uint8_t* byte, uint8_t timeout ) { + return SUCCESS; + } + + async command error_t UartStream.send( uint8_t* buf, uint16_t len ) { + return SUCCESS; + } + + async command error_t UartStream.enableReceiveInterrupt() { + return SUCCESS; + } + + async command error_t UartStream.disableReceiveInterrupt() { + return SUCCESS; + } + + async command error_t UartStream.receive( uint8_t* buf, uint16_t len ) { return SUCCESS; } } -- 2.39.2