Esempio n. 1
0
 def _GAID(self):
     '''
     refactoring hi_functions' AGID function
     '''
     device_rw.write_reg_4cc(self.tps6598x, VDM001002Def.GAID_WRITE_4CC_REG,
                             'GAID')
     device_rw.hw_sleep_ms(VDM001002Def.AGID_HW_SLEEP_MS)
Esempio n. 2
0
 def _GAID(self, chip_id):
     '''
     Refactoring hi_functions' AGID function
     '''
     device_rw.write_reg_4cc(self.tps6598x[chip_id],
                             USBC001001Def.GAID_WRITE_4CC_REG, 'GAID')
     device_rw.hw_sleep_ms(USBC001001Def.AGID_HW_SLEEP_MS)
Esempio n. 3
0
    def _FLrd(self, handle, address):
        '''
        Flash memory read 16_Byte from address
        '''
        data_in = hi_functions.byteArray(address)
        for i in range(PhoenixDef.FLRD_WRITE_DATA_LEN - len(data_in)):
            data_in.append(0)
        device_rw.write_reg(handle, PhoenixDef.FLRD_WRITE_ADDR, data_in)
        device_rw.write_reg_4cc(handle, PhoenixDef.FLRD_WRITE_4CC_ADDR, 'FLrd')

        cmdret = hi_functions.verify_cmd_completed(
            handle, hi_functions.FLASH_HI_TIMEOUT)
        if (cmdret == "Success"):
            (count,
             data_out) = device_rw.read_reg(handle, PhoenixDef.FLRD_WRITE_ADDR,
                                            PhoenixDef.FLRD_CHECK_DATA_LEN)
            return data_out

        return cmdret