Add in return of the number of cycles added when bumping a bench test.
[freeems-vanilla.git] / src / main / inc / packetTypes.h
blob292d28352b581d11a4cf1280936c88f2e2764702
1 /* FreeEMS - the open source engine management system
3 * Copyright 2008-2012 Fred Cooke
5 * This file is part of the FreeEMS project.
7 * FreeEMS software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
12 * FreeEMS software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with any FreeEMS software. If not, see http://www.gnu.org/licenses/
20 * We ask that if you make any changes to this file you email them upstream to
21 * us at admin(at)diyefi(dot)org or, even better, fork the code on github.com!
23 * Thank you for choosing FreeEMS to run your engine!
27 /** @file
29 * @ingroup allHeaders
33 /* Header file multiple inclusion protection courtesy eclipse Header Template */
34 /* and http://gcc.gnu.org/onlinedocs/gcc-3.1.1/cpp/ C pre processor manual */
35 #ifndef FILE_PACKET_TYPES_H_SEEN
36 #define FILE_PACKET_TYPES_H_SEEN
39 /*&&&&&&&&&&&&&&&&&&&& Payload Type ID Name Value Pairs &&&&&&&&&&&&&&&&&&&&*/
41 /* Please note, requests use even ID numbers and their matching responses use */
42 /* the odd number immediately above the original request ID. There are a few */
43 /* examples where either a request is not required or a response not sent. In */
44 /* such cases the odd ID may be used for an packet asyncronously sent from */
45 /* the EMS to the PC. These will be well commented when present. */
48 /*&&&&&&&&&&&&&&&&&&&&&&&& Protocol Payload Type IDs &&&&&&&&&&&&&&&&&&&&&&&*/
50 /* Firmware Independent functions */
51 #define requestInterfaceVersion 0x0000
52 #define requestFirmwareVersion 0x0002
53 #define requestMaxPacketSize 0x0004
54 #define requestEchoPacketReturn 0x0006
55 #define requestSoftSystemReset 0x0008 /* System comes up fresh, so no response */
56 //efine replytoSoftSystemReset 0x0009 /* This is reserved */
57 #define requestHardSystemReset 0x000A /* System comes up fresh, so no response */
58 //efine replytoHardSystemReset 0x000B /* This is reserved */
59 #define requestReInitOfSystem 0x000C /* EXPERIMENTAL, currently responds like normal */
60 //efine replytoReInitOfSystem 0x000D /* This is reserved */
63 //efine requestAsyncDebugInfo 0x000E /* This is reserved */
64 #define asyncDebugInfoPacket 0x000F /* NOTE : Unrequested debug information packet */
65 //efine requestAsyncErrorCode 0x0010 /* This is reserved */
66 #define asyncErrorCodePacket 0x0011 /* NOTE : Unrequested error event code packet */
69 /*&&&&&&&&&&&&&&&&&&&&&&&& Firmware Payload Type IDs &&&&&&&&&&&&&&&&&&&&&&&*/
71 /* Data block manipulation */
72 #define updateBlockInRAM 0x0100
73 #define updateBlockInFlash 0x0102
74 #define retrieveBlockFromRAM 0x0104
75 #define retrieveBlockFromFlash 0x0106
76 #define burnBlockFromRamToFlash 0x0108
78 /* Datalog request packets */
79 #define requestDatalogPacket 0x0190
80 #define responseBasicDatalog 0x0191 /* Defined because it can be used both synchronously and asynchronously */
81 #define requestByteLADatalog 0x0196 // logic analyser
82 #define responseByteLADatalog 0x0197 // logic analyser
84 /* Generic memory grabber for debugging */
85 #define retrieveArbitraryMemory 0x0258
87 /* Experimental unit testing interface */
88 #define requestUnitTestOverSerial 0x6666
90 // Bench testing init calls
91 #define startBenchTestSequence 0x8888
93 // Data interrogation gold
94 #define retrieveListOfLocationIDs 0xDA5E // Idea is Dave's, impl is Fred's
95 #define retrieveLocationIDDetails 0xF8E0 // Idea is Fred's, impl is Fred's
96 #define requestDecoderName 0xEEEE // Makes interrogation unique within a single build
97 #define requestFirmwareBuildDate 0xEEF0 // When it was built
98 #define requestCompilerVersion 0xEEF2 // Which GCC built it
99 #define requestOperatingSystem 0xEEF4 // Which OS was it built on
100 #define clearCountersAndFlagsToZero 0xFFF0 // Clean slate to perform tests of any type. Clears various flags too, should not affect running
102 // DEPRECATED TODO Remove once certain no users exist
103 #define adjustMainTableCell 0x012C
104 #define adjustMainTableRPMAxis 0x012E
105 #define adjustMainTableLoadAxis 0x0130
106 #define adjust2dTableAxis 0x0132
107 #define adjust2dTableCell 0x0134
108 #define setAsyncDatalogType 0x0194
110 #else
111 /* let us know if we are being untidy with headers */
112 #warning "Header file PACKET_TYPES_H seen before, sort it out!"
113 /* end of the wrapper ifdef from the very top */
114 #endif