hex_map_write_fd
hex_map_alloc hex_map_free hex_map_normalize hex_map_copy hex_map_merge hex_map_get_device hex_map_set_device hex_map_partition hex_map_append_block hex_map_delete_block hex_map_first_blockhex_map_write_fd
This function writes a HEX file using data from the Hex Map object. Unlike hex_map_write, it requires an open file handle, and may be used to write to standard output.
Syntax
int hex_map_write_fd(
hex_map_t map,
int file_handle
);
Parameters
map - a reference to the Hex Map object
file_handle - an open file handle to be used to write the file
On Windows, the file handle parameter has HANDLE type and may be obtained with CreateFile or GetStdHandle Windows API functions.
Return
The function returns non-zero if the write succeeds, or zero if the operation fails.
Notes
If the Hex Map object contains a device name, the function will append the device name to the end of the HEX file, for example:
:00000001FF
;dsPIC33CK1024MP708
The function will not close the file handle after writing.
Minimum library version - 163
© 2007-2025 Northern Software Inc. All Rights Reserved.