[Tinyos-2-commits] CVS: tinyos-2.x/tos/sensorboards/mts300 MicDeviceP.nc, 1.3, 1.4 MicP.nc, 1.3, 1.4

David Gay idgay at users.sourceforge.net
Fri May 2 12:47:30 PDT 2008


Update of /cvsroot/tinyos/tinyos-2.x/tos/sensorboards/mts300
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv6236

Modified Files:
	MicDeviceP.nc MicP.nc 
Log Message:
indentation

Index: MicDeviceP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/sensorboards/mts300/MicDeviceP.nc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** MicDeviceP.nc	14 Mar 2007 04:14:13 -0000	1.3
--- MicDeviceP.nc	2 May 2008 19:47:28 -0000	1.4
***************
*** 40,51 ****
    components MicP, MicaBusC, HplAtm128GeneralIOC as Pins,
      HplAtm128InterruptC as IntPins,
! 		new Atm128I2CMasterC() as I2CPot,
! 		new TimerMilliC() as WarmupTimer,
      new RoundRobinArbiterC(UQ_MIC_RESOURCE) as Arbiter,
      new SplitControlPowerManagerC() as PowerManager;
  
    Resource = Arbiter;
! 	Atm128AdcConfig = MicP;
! 	MicSetting = MicP;
  	
    PowerManager.ResourceDefaultOwner -> Arbiter;
--- 40,51 ----
    components MicP, MicaBusC, HplAtm128GeneralIOC as Pins,
      HplAtm128InterruptC as IntPins,
!     new Atm128I2CMasterC() as I2CPot,
!     new TimerMilliC() as WarmupTimer,
      new RoundRobinArbiterC(UQ_MIC_RESOURCE) as Arbiter,
      new SplitControlPowerManagerC() as PowerManager;
  
    Resource = Arbiter;
!   Atm128AdcConfig = MicP;
!   MicSetting = MicP;
  	
    PowerManager.ResourceDefaultOwner -> Arbiter;

Index: MicP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/sensorboards/mts300/MicP.nc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** MicP.nc	14 Mar 2007 04:14:13 -0000	1.3
--- MicP.nc	2 May 2008 19:47:28 -0000	1.4
***************
*** 38,44 ****
  
    uses interface Timer<TMilli>;
! 	uses interface GeneralIO as MicPower;
! 	uses interface GeneralIO as MicMuxSel;
! 	uses interface MicaBusAdc as MicAdc;
    uses interface I2CPacket<TI2CBasicAddr>;
    uses interface Resource as I2CResource;
--- 38,44 ----
  
    uses interface Timer<TMilli>;
!   uses interface GeneralIO as MicPower;
!   uses interface GeneralIO as MicMuxSel;
!   uses interface MicaBusAdc as MicAdc;
    uses interface I2CPacket<TI2CBasicAddr>;
    uses interface Resource as I2CResource;
***************
*** 54,59 ****
      call MicPower.makeOutput();
      call MicPower.set();
! 		call MicMuxSel.makeOutput();    
! 		call MicMuxSel.clr();
  		
      call MicSetting.muxSel(1);  // Set the mux so that raw microhpone output is selected
--- 54,59 ----
      call MicPower.makeOutput();
      call MicPower.set();
!     call MicMuxSel.makeOutput();    
!     call MicMuxSel.clr();
  		
      call MicSetting.muxSel(1);  // Set the mux so that raw microhpone output is selected
***************
*** 61,65 ****
  
      call Timer.startOneShot(1200); 
- //    signal SplitControl.startDone(SUCCESS);
      return SUCCESS;
    }
--- 61,64 ----
***************
*** 80,110 ****
    
    /**
!   * Resource request
!   * 
!   */  
    event void I2CResource.granted()
    {
!     if ( call I2CPacket.write(0x3,TOS_MIC_POT_ADDR, 2, gainData) == SUCCESS)
!     {
!       return;
!     };
    }
  
    /**
!   * mic control
!   * 
!   */  
    command error_t MicSetting.muxSel(uint8_t sel)
    {
      if (sel == 0)
!     {
!       call MicMuxSel.clr();
!       return SUCCESS;
!     }
      else if (sel == 1)
!     {
!       call MicMuxSel.set();
!       return SUCCESS;
!     }
      return FAIL;
    }
--- 79,106 ----
    
    /**
!    * Resource request
!    * 
!    */  
    event void I2CResource.granted()
    {
!     call I2CPacket.write(0x3,TOS_MIC_POT_ADDR, 2, gainData);
    }
  
    /**
!    * mic control
!    * 
!    */  
    command error_t MicSetting.muxSel(uint8_t sel)
    {
      if (sel == 0)
!       {
! 	call MicMuxSel.clr();
! 	return SUCCESS;
!       }
      else if (sel == 1)
!       {
! 	call MicMuxSel.set();
! 	return SUCCESS;
!       }
      return FAIL;
    }
***************
*** 124,130 ****
    
    /**
!   * mic interrupt control
!   * 
!   */
    async command error_t MicSetting.enable()
    {
--- 120,126 ----
    
    /**
!    * mic interrupt control
!    * 
!    */
    async command error_t MicSetting.enable()
    {
***************
*** 150,156 ****
    
    /**
!   *
!   *
!   */
    
    async command uint8_t MicAtm128AdcConfig.getChannel() 
--- 146,152 ----
    
    /**
!    *
!    *
!    */
    
    async command uint8_t MicAtm128AdcConfig.getChannel() 
***************
*** 170,179 ****
    
    /**
!   * I2CPot2
!   * 
!   */
    async event void I2CPacket.readDone(error_t error, uint16_t addr, uint8_t length, uint8_t* data)
    {
-     return ;
    }
    
--- 166,174 ----
    
    /**
!    * I2CPot2
!    * 
!    */
    async event void I2CPacket.readDone(error_t error, uint16_t addr, uint8_t length, uint8_t* data)
    {
    }
    
***************
*** 181,185 ****
    {
      call I2CResource.release();
-     return ;
    }
  }
--- 176,179 ----



More information about the Tinyos-2-commits mailing list