Skip to content

Commit 2e0fc7e

Browse files
committed
Update manual on write_hex_file optional arguments.
1 parent 75e3912 commit 2e0fc7e

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

docs/manual/part2-5.txt

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,21 @@ to disk you can use the builtin StringIO file-like object, e.g.::
2222

2323
Variable ``hexstr`` will contain a string with the content of a HEX8 file.
2424

25-
To write data as a hex file you also can use universal method ``tofile``::
25+
You can customize hex file output with following optional arguments
26+
to ``write_hex_file`` call:
2627

27-
>>> ih.tofile(sio, format='hex')
28+
* ``write_start_addr`` - you can disable start address record in new hex file;
29+
* ``eolstyle`` - you can force ``CRLF`` line endings in new hex file.
30+
31+
32+
Data converters
33+
~~~~~~~~~~~~~~~
2834

29-
**NOTE:** using IntelHex.tofile is recommended way.
35+
To write data as a hex file with default settings you also can use
36+
universal method ``tofile``::
37+
38+
# the code below is the same as "ih.write_hex_file(sio)"
39+
>>> ih.tofile(sio, format='hex')
3040

3141
Class IntelHex has several methods for converting data of IntelHex objects
3242
into binary form:

0 commit comments

Comments
 (0)