'Read Chip ID from OTP ROM - see http://esp8266-re.foogod.com/wiki/System_get_chip_id_%28IoT_RTOS_SDK_0.9.9%29'

def chip_id(self):

    id0 = self.read_reg(self.ESP_OTP_MAC0)
    id1 = self.read_reg(self.ESP_OTP_MAC1)
    return ((id0 >> 24) | ((id1 & MAX_UINT24) << 8))
