MCPcopy Create free account
hub / github.com/ARMmbed/DAPLink / create_padded_image

Function create_padded_image

tools/offset_update.py:31–38  ·  view source on GitHub ↗
(input_file, output_file, start,
                        pad_start, copy_size)

Source from the content-addressed store, hash-verified

29
30
31def create_padded_image(input_file, output_file, start,
32 pad_start, copy_size):
33 pad_size = start - pad_start
34 with open(input_file, 'rb') as file_handle:
35 data = file_handle.read()
36 output_data = data[0:copy_size] + bytes([0xff] * (pad_size - copy_size)) + data
37 with open(output_file, 'wb') as file_handle:
38 data = file_handle.write(output_data)
39
40
41def main():

Callers 1

mainFunction · 0.85

Calls 2

readMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected