def i2cReg(self,wr,addr=0x00,data=0x0000):
        try :
            if(wr == "w"):
                tmp = (data&0x00FF)<<8 | (data&0xFF00)>>8
                #print "W:0x%02X = 0x%04X" % (addr,data)
                return bus.write_word_data(self.I2C_ADDR,addr,tmp)
            elif(wr == "r"):
                tmp =  bus.read_word_data(self.I2C_ADDR,addr)
                tmp = (tmp&0x00FF)<<8 | (tmp&0xFF00)>>8               
                #print "R:0x%02X = 0x%04X" % (addr,tmp)
                return tmp
            else :
               return -1
        except __HOLE__ as err:
            print("No ACK!")
            time.sleep(0.1)
            self.i2cReg(wr,addr,data)
dataset/ETHPy150Open DexterInd/GrovePi/Software/Python/grove_i2c_temp_hum_hdc1000/grove_i2c_temp_hum_hdc1000.py/HDC1000.i2cReg