[Tinyos-beta-commits] CVS: tinyos-1.x/beta/platform/pxa27x PXA27XUSBClientM.nc, 1.9, 1.10 PXA27XUSBClient.h, 1.3, 1.4

Robbie Adler radler at users.sourceforge.net
Fri Jul 14 12:10:19 PDT 2006


Update of /cvsroot/tinyos/tinyos-1.x/beta/platform/pxa27x
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv2575

Modified Files:
	PXA27XUSBClientM.nc PXA27XUSBClient.h 
Log Message:
added commands for reset over USB


Index: PXA27XUSBClientM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/platform/pxa27x/PXA27XUSBClientM.nc,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** PXA27XUSBClientM.nc	8 Dec 2005 23:17:51 -0000	1.9
--- PXA27XUSBClientM.nc	14 Jul 2006 19:10:17 -0000	1.10
***************
*** 303,307 ****
  	    ///*atomic*/ UDCCSR0 |= _UDC_bit(UDCCSR0_FST);
  	    //trace("Unrecognized Control request\r\n");
! 	  }       
        }
        if(isFlagged(UDCISR0, _UDC_bit(INT_ENDA))){
--- 303,307 ----
  	    ///*atomic*/ UDCCSR0 |= _UDC_bit(UDCCSR0_FST);
  	    //trace("Unrecognized Control request\r\n");
! 	  }
        }
        if(isFlagged(UDCISR0, _UDC_bit(INT_ENDA))){
***************
*** 798,801 ****
--- 798,815 ----
       signal ReceiveBData.receive(OutStreamTemp->src, valid,
  				 OutStreamTemp->index, OutStreamTemp->n, type);
+ #ifdef BOOTLOADER
+    /** 
+     * Added for Boot Loader compatibility, All the messages from the boot loader
+     * application will reboot the board. -junaith
+     */
+    else if ((((OutStreamTemp->type) & 0xE3) == IMOTE_HID_TYPE_MSC_REBOOT) ||
+             (((OutStreamTemp->type) & 0xE3) == IMOTE_HID_TYPE_MSC_BINARY) ||
+             (((OutStreamTemp->type) & 0xE3) == IMOTE_HID_TYPE_MSC_COMMAND))
+    {
+       OSMR3 = OSCR0 + 9000;
+       OWER = 1;
+       while(1);     
+    }
+ #endif
     else
       signal ReceiveData.receive(OutStreamTemp->src, valid);
***************
*** 1280,1284 ****
       }
       break;
!    }   
   }
   
--- 1294,1298 ----
       }
       break;
!    }
   }
   

Index: PXA27XUSBClient.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/platform/pxa27x/PXA27XUSBClient.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PXA27XUSBClient.h	18 Oct 2005 21:22:53 -0000	1.3
--- PXA27XUSBClient.h	14 Jul 2006 19:10:17 -0000	1.4
***************
*** 152,155 ****
--- 152,170 ----
  #define IMOTE_HID_TYPE_MSC_DEFAULT 0
  #define IMOTE_HID_TYPE_MSC_BLOADER 1
+ 
+ /**
+  * The types used by the boot loader extending
+  * JT Protocol messages.
+  * FIXME Currently the driver will not push the
+  * MSC types to the right bits, so its easier to
+  * set the right bits to start with. 
+  * NOTE this value is not the same in PC App but the
+  * result is the same.
+  */
+ #define IMOTE_HID_TYPE_MSC_REBOOT 64
+ #define IMOTE_HID_TYPE_MSC_COMMAND 96
+ #define IMOTE_HID_TYPE_MSC_BINARY 128
+ #define IMOTE_HID_TYPE_MSC_ERROR 160
+ 
  //Imote2 HID report, max packet data sizes
  #define IMOTE_HID_BYTE_MAXPACKETDATA 62



More information about the Tinyos-beta-commits mailing list