[Tinyos-beta-commits] CVS: tinyos-1.x/beta/platform/imote2 HPLCC2420M.nc, 1.3, 1.4

Philip Buonadonna philipb at users.sourceforge.net
Wed Mar 9 14:43:09 PST 2005


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

Modified Files:
	HPLCC2420M.nc 
Log Message:
- Fixed DMA interrupt handler to properly clear interrupt conditions
- Fixed readRXFIFO to handle malformed packet lengths


Index: HPLCC2420M.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/platform/imote2/HPLCC2420M.nc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** HPLCC2420M.nc	9 Mar 2005 01:04:54 -0000	1.3
--- HPLCC2420M.nc	9 Mar 2005 22:42:59 -0000	1.4
***************
*** 353,360 ****
      pktlen = SSDR_3;
      rxbuf[0] = pktlen;
  
      if (pktlen > 0) {
        //rxbuf = data;
!       pktlen++;
        rxlen = (pktlen < length) ? pktlen : length;
        
--- 353,361 ----
      pktlen = SSDR_3;
      rxbuf[0] = pktlen;
+     pktlen++;
  
      if (pktlen > 0) {
        //rxbuf = data;
! 
        rxlen = (pktlen < length) ? pktlen : length;
        
***************
*** 364,367 ****
--- 365,369 ----
        DCSR(1) = (DCSR_RUN | DCSR_NODESCFETCH);
        SSTO_3 = (96*8);
+ 
      }
      else {
***************
*** 544,548 ****
    async event void DMAInterrupt.fired() {
      uint8_t i,tmp;
!     atomic {
      switch (gIFState) {
  
--- 546,550 ----
    async event void DMAInterrupt.fired() {
      uint8_t i,tmp;
! 
      switch (gIFState) {
  
***************
*** 553,559 ****
        TOSH_SET_CC_CSN_PIN();
  
-       DCSR(0) = (DCSR_NODESCFETCH);
-       DCSR(1) = (DCSR_NODESCFETCH);
- 
        SSTO_3 = 0;
        SSSR_3 |= (SSSR_TINT);
--- 555,558 ----
***************
*** 565,570 ****
      case HPLCC2420_STATE_FIFOWR:
  
-       DCSR(1) = (DCSR_NODESCFETCH); // Clear the STOPPED interrupt
- 
        // Drain the RXFIFO
        for (i = 0; i < 17; i++) {
--- 564,567 ----
***************
*** 581,585 ****
  
      }
!     }
    }      
  
--- 578,584 ----
  
      }
!     // Clear the interrupting conditions. 
!     DCSR(0) = (DCSR_NODESCFETCH | DCSR_EORINTR | DCSR_STARTINTR | DCSR_BUSERRINTR);
!     DCSR(1) = (DCSR_NODESCFETCH | DCSR_EORINTR | DCSR_STARTINTR | DCSR_BUSERRINTR);
    }      
  



More information about the Tinyos-beta-commits mailing list