def parse_file(file):
	print('{0:^10s} | {1:^28s} | {2:^10s}'. format('offset', file.name, 'value'))
	print('-' * 54)
	for line in file:
		register = ast.literal_eval(line)
		val = reg.read(register[1])
		intreg = int(register[1], 16)
		print('{0:#010x} | {1:<28} | {2:#010x}'.format(intreg, register[0], val))
	print('')
Example #2
0
def parse_file(file):
    print('{0:^10s} | {1:^28s} | {2:^10s}'.format('offset', file.name,
                                                  'value'))
    print('-' * 54)
    for line in file:
        register = ast.literal_eval(line)
        val = reg.read(register[1])
        intreg = int(register[1], 16)
        print('{0:#010x} | {1:<28} | {2:#010x}'.format(intreg, register[0],
                                                       val))
    print('')
def parse_file(file):
    print('{0:^10s} | {1:^33s} | {2:^10s}'. format('offset', file.name, 'value'))
    print('-' * 59)
    for line in file:
        if ignore_line(line):
            continue
        register = ast.literal_eval(line)
        intreg = int(register[1], 16)
        if register[2] == 'FLISDSI':
            val = reg.flisdsi_read(intreg)
        elif register[2] == 'DPIO':
            val = reg.dpio_read(intreg, 0)
        elif register[2] == 'DPIO2':
            val = reg.dpio_read(intreg, 1)
        else:
            if register[2] != '':
                intreg = intreg + int(register[2], 16)
            val = reg.read(intreg)
        print('{0:#010x} | {1:<33} | {2:#010x}'.format(intreg, register[0], val))
    print('')
Example #4
0
def parse_file(file):
    print('{0:^10s} | {1:^33s} | {2:^10s}'.format('offset', file.name,
                                                  'value'))
    print('-' * 59)
    for line in file:
        if ignore_line(line):
            continue
        register = ast.literal_eval(line)
        intreg = int(register[1], 16)
        if register[2] == 'FLISDSI':
            val = reg.flisdsi_read(intreg)
        elif register[2] == 'DPIO':
            val = reg.dpio_read(intreg, 0)
        elif register[2] == 'DPIO2':
            val = reg.dpio_read(intreg, 1)
        else:
            if register[2] != '':
                intreg = intreg + int(register[2], 16)
            val = reg.read(intreg)
        print('{0:#010x} | {1:<33} | {2:#010x}'.format(intreg, register[0],
                                                       val))
    print('')