AtMega CAN Bootloader
Well documented CAN-based bootloader for AtMega processors
messagedefinitions.h
Go to the documentation of this file.
1 /*
2  * <copyright>
3  * Copyright (c) 2014: Tuomas Huuki / Proximia, http://proximia.fi/
4  *
5  * This file is free software; you can redistribute it and/or modify
6  * it under the terms of either the GNU General Public License version 2
7  * or the GNU Lesser General Public License version 2.1, both as
8  * published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * Lesser GNU General Public License for more details.
14  *
15  * You should have received a copy of the (Lesser) GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  * </copyright>
18  */
19 
20 /* $Id$ */
21 
70 #ifndef MESSAGEDEFINITIONS_H_
71 #define MESSAGEDEFINITIONS_H_
72 
74 #define NODE_ADDRESS_MASK 0x007F
75 
77 #define MPOSCOMMANDBYTE 0x00
79 #define MPOSERRORDESCBYTE 0x01
88 #define MTYPESDOSLAVE 0x0580
89 #define MTYPESDOMASTER 0x0600
152 #define MACTYPERESETNODE 0x02
154 #define MACTYPESENDBOOTLOADERVERSION 0x50
156 #define MACTYPEREADEEPROMBYTE 0x55
157 #define MACTYPEWRITEEEPROMBYTE 0x56
159 #define MACTYPEREADFLASHBYTE 0x5A
160 #define MACTYPESELECTFLASHPAGE 0x5B
161 #define MACTYPEWRITEFLASHPAGE 0x5C
162 #define MACTYPEREADBYTEFROMFLASHBUFFER 0x5D
163 #define MACTYPEWRITEBYTETOFLASHBUFFER 0x5E
173 #define MACTYPESENDERROR 0xF0
174 #define ERRORBOOTLOADERSESSIONNOTOPEN 0x50
175 #define ERRORBOOTLOADERINVALIDDATA 0x51
177 #endif /* MESSAGEDEFINITIONS_H_ */