[Tinyos-beta-commits] CVS: tinyos-1.x/beta/platform/imote2 BluSH_types.h, 1.1, 1.2 BluSHC.nc, 1.1, 1.2 BluSHM.nc, 1.2, 1.3

Josh jsherbach at users.sourceforge.net
Fri Aug 26 15:38:07 PDT 2005


Update of /cvsroot/tinyos/tinyos-1.x/beta/platform/imote2
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8380

Modified Files:
	BluSH_types.h BluSHC.nc BluSHM.nc 
Log Message:
Updated version of BluSH. Supports USB (controlled by a #define), 
"batch" commands, lines terminated with "\r\n" and various other things

Index: BluSH_types.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/platform/imote2/BluSH_types.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** BluSH_types.h	9 Mar 2005 00:59:24 -0000	1.1
--- BluSH_types.h	26 Aug 2005 22:38:05 -0000	1.2
***************
*** 1,2 ****
--- 1,4 ----
+ #ifndef __BLUSH_TYPES_H
+ #define __BLUSH_TYPES_H
  enum 
    {
***************
*** 7,8 ****
--- 9,17 ----
  
  typedef uint8_t BluSH_result_t;
+ typedef struct __BluSHdata_t{
+   uint8_t *src;
+   uint32_t len;
+   uint8_t state;
+ } BluSHdata_t;
+ typedef BluSHdata_t * BluSHdata;
+ #endif

Index: BluSHC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/platform/imote2/BluSHC.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** BluSHC.nc	9 Mar 2005 00:59:24 -0000	1.1
--- BluSHC.nc	26 Aug 2005 22:38:05 -0000	1.2
***************
*** 1,19 ****
! configuration BluSHC {
!   provides interface StdControl;
!   uses interface BluSH_AppI[uint8_t id];
! }
! 
! implementation {
!     components 
!         UARTBufferC as UARTBuffer,
!         //DebugUARTBufferC as UARTBuffer,
!         BluSHM;
!   
!     StdControl = BluSHM;
!     
!     BluSHM.UartControl -> UARTBuffer.Control;
!     BluSHM.UartSend -> UARTBuffer.SendVarLenPacket;
!     BluSHM.UartReceive -> UARTBuffer.ReceiveData;
!     
!     BluSH_AppI = BluSHM;
! }
--- 1,27 ----
! #define USE_USB 1
! configuration BluSHC {
!   provides interface StdControl;
!   uses interface BluSH_AppI[uint8_t id];
! }
! implementation {
!   components 
!     UARTBufferC as UARTBuffer,
!     //DebugUARTBufferC as UARTBuffer,
! #if USE_USB    
!     HPLUSBClientC as USBClient,
! #endif
!     BluSHM;
! 
!   StdControl = BluSHM;
! 
! #if USE_USB
!   BluSHM.USBSend -> USBClient.SendJTPacket;
!   BluSHM.USBReceive -> USBClient.ReceiveData;
! #endif
! 
!   BluSHM.UartControl -> UARTBuffer.Control;
!   BluSHM.UartSend -> UARTBuffer.SendVarLenPacket;
!   BluSHM.UartReceive -> UARTBuffer.ReceiveData;
!   
!   BluSH_AppI = BluSHM;
! }

Index: BluSHM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/platform/imote2/BluSHM.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** BluSHM.nc	4 Aug 2005 23:00:59 -0000	1.2
--- BluSHM.nc	26 Aug 2005 22:38:05 -0000	1.3
***************
*** 1,587 ****
! module BluSHM {
!   provides
!     {
!       interface StdControl;
!     }
!   
!   uses
!     {
!       interface StdControl as UartControl;
!       interface SendVarLenPacket as UartSend;
[...1017 lines suppressed...]
!  
!  void clearOut(){
!    DynQueue QueueTemp;
!    atomic QueueTemp = OutQueue;
!    while(DynQueue_getLength(QueueTemp) > 0)
!      clearBluSHdata((BluSHdata)DynQueue_dequeue(QueueTemp));
!  }
!  
!  void clearIn(){
!    DynQueue QueueTemp;
!    atomic QueueTemp = InQueue;
!    while(DynQueue_getLength(QueueTemp) > 0)
!      clearBluSHdata((BluSHdata)DynQueue_dequeue(QueueTemp));
!  }
!  
!  void clearBluSHdata(BluSHdata data){
!    free(data->src);
!    free(data);
!  } 
! }



More information about the Tinyos-beta-commits mailing list