def _read_eeprom(self, address, size):
        '''Read EEPROM
        '''
        self._intf.write(self._base_addr + self.CAL_EEPROM_ADD, array('B', pack('>H', address & 0x3FFF)))  # 14-bit address, 16384 bytes

        n_pages, n_bytes = divmod(size, self.CAL_EEPROM_PAGE_SIZE)
        data = array('B')
        for _ in range(n_pages):
            data.extend(self._intf.read(self._base_addr + self.CAL_EEPROM_ADD | 1, size=self.CAL_EEPROM_PAGE_SIZE))

        if n_bytes > 0:
            data.extend(self._intf.read(self._base_addr + self.CAL_EEPROM_ADD | 1, size=n_bytes))

        return data
def _read_eeprom ( self , address , size ) : self . _intf . write ( self . _base_addr + self . CAL_EEPROM_ADD , array ( 'B' , pack ( '>H' , address & 0x3FFF ) ) ) n_pages , n_bytes = divmod ( size , self . CAL_EEPROM_PAGE_SIZE ) data = array ( 'B' ) for _ in range ( n_pages ) : data . extend ( self . _intf . read ( self . _base_addr + self . CAL_EEPROM_ADD | 1 , size = self . CAL_EEPROM_PAGE_SIZE ) ) if n_bytes > 0 : data . extend ( self . _intf . read ( self . _base_addr + self . CAL_EEPROM_ADD | 1 , size = n_bytes ) ) return data
Read EEPROM