[Tinyos-contrib-commits] CVS: tinyos-1.x/contrib/handhelds/tos/interfaces DMA.nc, 1.3, 1.4

steve ayer ayer1 at users.sourceforge.net
Thu Mar 27 13:15:08 PDT 2008


Update of /cvsroot/tinyos/tinyos-1.x/contrib/handhelds/tos/interfaces
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv9124

Modified Files:
	DMA.nc 
Log Message:

added many fine-grain controls; stephen linder adds for his new dma
sd driver.


Index: DMA.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/handhelds/tos/interfaces/DMA.nc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** DMA.nc	7 Sep 2006 18:36:07 -0000	1.3
--- DMA.nc	27 Mar 2008 20:15:05 -0000	1.4
***************
*** 39,47 ****
  
    command void beginTransfer();
- 
    command void stopTransfer();
  
    command void setSourceAddress(uint16_t src);
- 
    command void setDestinationAddress(uint16_t dest);
      
--- 39,45 ----
***************
*** 52,73 ****
    command void setChannelPriority(bool roundrobin);
  
!   command void setDestinationAddressIncrement(enum addressIncrement ai);
! 
!   command void setSourceAddressIncrement(enum addressIncrement ai);
      
    command void setSourceByteSize(bool byteSize);
- 
    command void setDestinationByteSize(bool byteSize);
  
    command void ADCinit();
-     
    command void ADCbeginConversion(); 
- 
    command void ADCstopConversion();
- 
    command void ADCsetMemRegisterInputChannel(uint8_t reg_num, uint8_t ch);
      
-   async default event void transferComplete();
- 
    async default event void ADCInterrupt(uint8_t regnum);
  }    
--- 50,124 ----
    command void setChannelPriority(bool roundrobin);
  
!   command void setDestinationAddressIncrement(addressIncrement ai);
!   command void setSourceAddressIncrement(addressIncrement ai);
      
    command void setSourceByteSize(bool byteSize);
    command void setDestinationByteSize(bool byteSize);
  
+   async default event void transferComplete();
+ 
+   // Analog to Digital Converter code that should be move at some point
    command void ADCinit();
    command void ADCbeginConversion(); 
    command void ADCstopConversion();
    command void ADCsetMemRegisterInputChannel(uint8_t reg_num, uint8_t ch);
      
    async default event void ADCInterrupt(uint8_t regnum);
+   
+   ///////////////////////////////////////////////////////////////////////
+     // augmented interface added by SPL 10-16-07 to enable the abstraction
+     // of DMA access to the SD card. When possible uses the conventions found
+     // in MSP430DMAChannelControl.nc by Ben Greenstein <ben at cs.ucla.edu>
+     ///////////////////////////////////////////////////////////////////////
+ 
+     async command result_t setTrigger(dma_trigger_t trigger);
+     async command void clearTrigger();
+ 
+     async command void setOnFetch(); 
+     async command void clearOnFetch(); 
+     async command void setRoundRobin(); 
+     async command void clearRoundRobin(); 
+     async command void setENNMI(); 
+     async command void clearENNMI(); 
+     async command void 			setControllerState(dma_state_t s);
+     async command dma_state_t 	getControllerState();
+ 
+ 
+     async command void setSingleMode();
+     async command void setBlockMode();
+     async command void setBurstMode();
+     async command void setRepeatedSingleMode();
+     async command void setRepeatedBlockMode();
+     async command void setRepeatedBurstMode();
+ 
+     async command void setSrcNoIncrement();
+     async command void setSrcDecrement();
+     async command void setSrcIncrement();
+     async command void setDstNoIncrement();
+     async command void setDstDecrement();
+     async command void setDstIncrement();
+ 
+     async command void setWordToWord(); 
+     async command void setByteToWord(); 
+     async command void setWordToByte(); 
+     async command void setByteToByte(); 
+ 
+ 
+     async command void setEdgeSensitive();
+     async command void setLevelSensitive();
+ 
+     async command void enableDMA();		// different than beginTransfer() found above
+     async command void disableDMA();
+     async command bool getBusyState();
+     async command void enableInterrupt(); 
+     async command void disableInterrupt(); 
+ 
+     async command bool interruptPending();
+     async command void reset();
+     async command bool aborted();
+     async command void triggerDMA();
+     // not tested
+     async command void 					setState(dma_channel_state_t s);
+     async command dma_channel_state_t 	getState();
+   
  }    



More information about the Tinyos-contrib-commits mailing list