]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/msp430/adc12/HplAdc12.nc
GCC 4.4.3 seems to have proper bitfield support.
[tinyos-2.x.git] / tos / chips / msp430 / adc12 / HplAdc12.nc
index e3b57278b860c3ac459bd050a3a26a406030e278..dd42c30c211672af12f0821787c53002dbc80ad5 100644 (file)
@@ -69,24 +69,24 @@ interface HplAdc12
   
   /** 
    * Sets the ADC12 conversion memory control register ADC12MCTLx.
-   * @param index The register index (the 'x' in ADC12MCTLx) [0..15] 
+   * @param idx The register index (the 'x' in ADC12MCTLx) [0..15] 
    * @param memControl ADC12MCTLx register data.
    */
-  async command void setMCtl(uint8_t index, adc12memctl_t memControl); 
+  async command void setMCtl(uint8_t idx, adc12memctl_t memControl); 
   
   /** 
    * Returns the ADC12 conversion memory control register ADC12MCTLx.
-   * @param index The register index (the 'x' in ADC12MCTLx) [0..15] 
+   * @param idx The register index (the 'x' in ADC12MCTLx) [0..15] 
    * @return memControl ADC12MCTLx register data.
    */
-  async command adc12memctl_t getMCtl(uint8_t index); 
+  async command adc12memctl_t getMCtl(uint8_t idx); 
 
   /** 
    * Returns the ADC12 conversion memory register ADC12MEMx.
-   * @param index The register index (the 'x' in ADC12MEMx) [0..15] 
+   * @param idx The register index (the 'x' in ADC12MEMx) [0..15] 
    * @return ADC12MEMx 
    */  
-  async command uint16_t getMem(uint8_t index); 
+  async command uint16_t getMem(uint8_t idx); 
 
   /** 
    * Sets the ADC12 interrupt enable register, ADC12IE.
@@ -105,22 +105,6 @@ interface HplAdc12
    */
   async command void resetIFGs(); 
 
-  /** 
-   * Returns the ADC12 interrupt flag register, ADC12IFG.
-   * @return ADC12IFG
-   */  
-  async command uint16_t getIFGs(); 
-
-  /** 
-   * Signals an ADC12MEMx overflow.
-   */ 
-  async event void memOverflow();
-
-  /** 
-   * Signals a Conversion time overflow.
-   */ 
-  async event void conversionTimeOverflow();
-
   /** 
    * Signals a conversion result. 
    * @param iv ADC12 interrupt vector value 0x6, 0x8, ... , 0x24
@@ -133,71 +117,10 @@ interface HplAdc12
    */ 
   async command bool isBusy();
 
-  /** 
-   * Sets the Sample-and-hold time flags, SHT0x and SHT1x.
-   * Requires ENC-flag to be reset (disableConversion) !
-   * @param sht Sample-and-hold, top 4 bits = SHT1x, lower 4 bits = SHT0x
-   */
-  async command void setSHT(uint8_t sht);
-
-  /** 
-   * Sets the multiple sample and conversion flag, MSC in ADC12CTL0. 
-   * Requires ENC-flag to be reset (disableConversion) !
-   */
-  async command void setMSC();
-  /** 
-   * Resets the multiple sample and conversion flag, MSC in ADC12CTL0.
-   * Requires ENC-flag to be reset (disableConversion) !
-   */
-  async command void resetMSC();
-
-  /** 
-   * Sets the REFON in ADC12CTL0. 
-   * Requires ENC-flag to be reset (disableConversion) !
-   */
-  async command void setRefOn();
-
-  /** 
-   * Resets the REFON in ADC12CTL0. 
-   * Requires ENC-flag to be reset (disableConversion) !
-   */
-  async command void resetRefOn();
-
-  /** 
-   * Returns the REFON flag in ADC12CTL0. 
-   * @return REFON
-   */
-  async command uint8_t getRefon();     
-
-  /** 
-   * Sets the reference generator voltage to 1.5V. 
-   * Requires ENC-flag to be reset (disableConversion) !
-   */
-  async command void setRef1_5V();
-
-  /** 
-   * Sets the reference generator voltage to 2.5V. 
-   * Requires ENC-flag to be reset (disableConversion) !
-   */
-  async command void setRef2_5V();
-
-  /** 
-   * Returns reference voltage level (REF2_5V flag). 
-   * @return 0 if reference generator voltage is 1.5V, 
-   * 1 if  reference generator voltage is 2.5V
-   */
-  async command uint8_t isRef2_5V(); 
-   
-  /**
-   * Enables a conversion (sets the ENC flag).
-   */
-  async command void enableConversion();
-
   /**
-   * Disables a conversion (resets the ENC flag).
+   * Stops a conversion.
    */
-  async command void disableConversion();
+  async command void stopConversion();
 
   /**
    * Starts a conversion.
@@ -205,18 +128,9 @@ interface HplAdc12
   async command void startConversion();
 
   /**
-   * Stops a conversion.
-   */  
-  async command void stopConversion();
-  
-  /**
-   * Switches the ADC12 off (ADC12ON flag).
-   */  
-  async command void adcOff();
+   * Enables conversion (sets the ENC bit).
+   */
+  async command void enableConversion();
 
-  /**
-   * Switches the ADC12 off (ADC12ON flag).
-   */    
-  async command void adcOn();
 }