         }
         
 
-        // Second call to AppleSMC - now we can get the data
+        // Second call to AppleSMC - now we can write the data
         // TODO: Check that dataSize is the same as given from user
         inputStruct.keyInfo.dataSize = outputStruct.keyInfo.dataSize
         inputStruct.data8 = UInt8(Selector.kSMCWriteKey.toRaw())

    Get the current temperature from a sensor
    
    :param: key The temperature sensor to read from
    :returns: Temperature in Celsius. If the sensor is not found, or an error
              occurs, return will be zero
    :returns: IOReturn IOKit return code
    :returns: kSMC SMC return code
    */
    public func getTMP(key : TMP) -> (tmp      : UInt,
                                      IOReturn : kern_return_t,
                                      kSMC     : UInt8) {
       var result = readSMC(key.toRaw())
        
       // We drop the decimal value (data[1]) for now - thus maybe be off +/- 1
       // Data type is sp78 - unsigned floating point
       // http://stackoverflow.com/questions/22160746/fpe2-and-sp78-data-types
       return (UInt(result.data[0]), result.IOReturn, result.kSMC)
    }
    
    

    };
    
    
    /**
    Temperature units
    */
    public enum TMP_UNIT {
        case Celsius
        case Fahrenheit
        case Kelvin
    }
    
    
    //--------------------------------------------------------------------------
    // MARK: PRIVATE ENUMS
    //--------------------------------------------------------------------------
