srecord 1.65.0
 
Loading...
Searching...
No Matches
stm32.h
Go to the documentation of this file.
1//
2// srecord - manipulate eprom load files
3// Copyright (C) 2012 Peter Miller
4//
5// This program is free software; you can redistribute it and/or modify it
6// under the terms of the GNU Lesser General Public License as published by
7// the Free Software Foundation; either version 3 of the License, or (at your
8// option) any later version.
9//
10// This program is distributed in the hope that it will be useful, but WITHOUT
11// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12// FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13// for more details.
14//
15// You should have received a copy of the GNU Lesser General Public License
16// along with this program. If not, see <http://www.gnu.org/licenses/>.
17//
18//
19// From: Hendrik Beijeman <hbeyeman@gmail.com>
20// To: pmiller@opensource.org.au
21// Subject: Re: patch for srecord 1.59
22// Date: Sat, 05 May 2012 06:26:02 +0200 (05/05/12 14:26:02)
23//
24// I hereby formally assign all copyright to the author of srecord,
25// Peter Miller.
26//
27
28#ifndef SRECORD_INPUT_FILTER_MESSAGE_STM32_H
29#define SRECORD_INPUT_FILTER_MESSAGE_STM32_H
30
31#include <srecord/stm32.h>
32#include <srecord/endian.h>
34
35namespace srecord
36{
37
38/**
39 * The input_filter_message_stm32 class represents the code required to
40 * calculate an STM32 (CRC) value.
41 * http://www.st.com/
42 */
43class input_filter_message_stm32:
45{
46public:
47 /**
48 * The destructor.
49 */
51
52private:
53 /**
54 * The constructor.
55 *
56 * @param deeper
57 * The incoming data source to be filtered
58 * @param address
59 * where to place the checksum
60 * @param end
61 * The byte order.
62 */
63 input_filter_message_stm32(const input::pointer &deeper,
64 unsigned long address, endian_t end);
65
66public:
67 /**
68 * The create class method is used to create new dynamically
69 * allocated instances of this class.
70 *
71 * @param deeper
72 * The incoming data source to be filtered
73 * @param address
74 * where to place the checksum
75 * @param end
76 * The byte order.
77 */
78 static pointer create(const input::pointer &deeper, unsigned long address,
79 endian_t end);
80
81protected:
82 // See base class for documentation.
84
85 // See base class for documentation.
87
88 // See base class for documentation.
89 const char *get_algorithm_name(void) const;
90
91 // See base class for documentation.
92 unsigned get_minimum_alignment(void) const;
93
94private:
95 /**
96 * The address instance variable is used to remember where to place
97 * the CRC in memory.
98 */
99 unsigned long address;
100
101 /**
102 * The end instance variable is used to remember whether the byte
103 * order is big-endian or little-endian.
104 */
105 endian_t end;
106
107 /**
108 * The default constructor. Do not use.
109 */
110 input_filter_message_stm32();
111
112 /**
113 * The copy constructor. Do not use.
114 */
115 input_filter_message_stm32(const input_filter_message_stm32 &);
116
117 /**
118 * The assignment operator. Do not use.
119 */
120 input_filter_message_stm32 &operator=(const input_filter_message_stm32 &);
121};
122
123};
124
125// vim: set ts=8 sw=4 et :
126#endif // SRECORD_INPUT_FILTER_MESSAGE_STM32_H
The srecord::arglex_tool is used to parse command line with srec-specific arguments.
Definition tool.h:41
virtual ~input_filter_message_stm32()
The destructor.
unsigned get_minimum_alignment(void) const
The get_minimum_alignment method is used to obtain the minium require dbyte alignment.
static pointer create(const input::pointer &deeper, unsigned long address, endian_t end)
The create class method is used to create new dynamically allocated instances of this class.
const char * get_algorithm_name(void) const
The get_algorithm_name method is used in error messages.
void command_line(arglex_tool *cmdln)
The command_line method is used by arglex_srec::get_input when parsing the command line,...
void process(const memory &input, record &output)
The process method is used to process the data from the input.
input_filter_message(const input::pointer &deeper, bool naked=false)
The constructor.
The srecord::input class is used to represent an abstract EPROM load file source.
Definition input.h:39
std::shared_ptr< input > pointer
Definition input.h:41
The srecord::memory class is used to simulate memory contents.
Definition memory.h:40
The srecord::output class is used to represent an abstract output vector.
Definition output.h:39
The srecord::record class is used to represent a data record read from a file.
Definition record.h:35
endian_t
Definition endian.h:27