| Linduino 1.3.0 Linear Technology Arduino-Compatible Demonstration Board

hex_file_parser.h
Go to the documentation of this file.
1 /*!
2
3 Copyright 2018(c) Analog Devices, Inc.
4
5 All rights reserved.
6
7 Redistribution and use in source and binary forms, with or without
8 modification, are permitted provided that the following conditions are met:
9 - Redistributions of source code must retain the above copyright
10 notice, this list of conditions and the following disclaimer.
11 - Redistributions in binary form must reproduce the above copyright
12 notice, this list of conditions and the following disclaimer in
13 the documentation and/or other materials provided with the
14 distribution.
15 - Neither the name of Analog Devices, Inc. nor the names of its
16 contributors may be used to endorse or promote products derived
17 from this software without specific prior written permission.
18 - The use of this software may or may not infringe the patent rights
19 of one or more patent holders. This license does not release you
20 from the requirement that you obtain separate licenses from these
21 patent holders to use this software.
22 - Use of the software either in source or binary form, must be run
23 on or directly connected to an Analog Devices Inc. component.
24
25 THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
26 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
27 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
28 IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
29 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30 LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
31 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
33 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 */
36 /*! @file
37 @ingroup LTPSM_InFlightUpdate
38 Library Header File
39 */
40
41 #ifndef HEX_FILE_PARSER_H_
42 #define HEX_FILE_PARSER_H_
43
44 #include <stdlib.h>
45 #include <stdint.h>
46 #include "conversions.h"
47
48 #include "record_type_definitions.h"
49
50 extern uint8_t filter_terminations(uint8_t (*get_data)(void));
51 extern uint8_t detect_colons(uint8_t (*get_data)(void));
52 extern void reset_parse_hex(void);
53 extern uint16_t parse_hex_block(char *in_data, uint16_t in_length, uint8_t *out_data);
54 extern uint8_t parse_hex(uint8_t (*get_data)(void));
55 extern uint16_t parse_records(uint8_t *in_data, uint16_t in_length, tRecordHeaderLengthAndType **out_records);
56 extern pRecordHeaderLengthAndType parse_record(uint8_t (*get_data)(void));
57 extern pRecordHeaderLengthAndType print_record(pRecordHeaderLengthAndType (*get_data)(void));
58
59 #endif
reset_parse_hex
void reset_parse_hex(void)
Definition: hex_file_parser.cpp:79
parse_hex_block
uint16_t parse_hex_block(char *in_data, uint16_t in_length, uint8_t *out_data)
filter_terminations
uint8_t filter_terminations(uint8_t(*get_data)(void))
Definition: hex_file_parser.cpp:53
conversions.h
Copyright 2018(c) Analog Devices, Inc.
record_type_definitions.h
Copyright 2018(c) Analog Devices, Inc.
parse_records
uint16_t parse_records(uint8_t *in_data, uint16_t in_length, tRecordHeaderLengthAndType **out_records)
Definition: hex_file_parser.cpp:190
print_record
pRecordHeaderLengthAndType print_record(pRecordHeaderLengthAndType(*get_data)(void))
Definition: hex_file_parser.cpp:255
tRecordHeader
Basic Record Type Definitions.
Definition: record_type_basic_definitions.h:52
detect_colons
uint8_t detect_colons(uint8_t(*get_data)(void))
Definition: hex_file_parser.cpp:63
parse_record
pRecordHeaderLengthAndType parse_record(uint8_t(*get_data)(void))
Definition: hex_file_parser.cpp:213
parse_hex
uint8_t parse_hex(uint8_t(*get_data)(void))
Definition: hex_file_parser.cpp:95