SRD Standelone programmation box: SRDMemoryMapping.h Source File

| SRD Standelone programmation box 2.0 (16/11/15 10:00:00) Documentation of the SRD standelone programmation box

- Main Page
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Enumerations Enumerator Macros Pages
SRDMemoryMapping.h
Go to the documentation of this file.
1 /*############################################################################################*/
2 /*############################################################################################*/
3 /**
4 * \file SRDMemoryMapping.h
5 * \author Thibaut LALUQUE 3D-Ouest
6 * \date 21/11/2014
7 * \version 1.0
8 * \brief Headerfile for SRD Memory Mapping.
9 * \details All Right Reserved.
10 */
11 /*############################################################################################*/
12 /*############################################################################################*/
13 #ifndef __SRDMEMORYMAPPING_H__
14 #define __SRDMEMORYMAPPING_H__
15
16 /*############################################################################################*/
17 /*## INCLUDES ################################################################################*/
18 /*############################################################################################*/
19
20 /*############################################################################################*/
21 /*## END INCLUDES ############################################################################*/
22 /*############################################################################################*/
23
24
25 /*############################################################################################*/
26 /*## DEFINES #################################################################################*/
27 /*############################################################################################*/
28 /*----------------------------------------------------------------------------*/
29 /**
30 * \brief Define the memory index of all data in the SRD RFID memory.
31 */
32 ///@{
33 /*----------------------------------------------------------------------------*/
34 #define SRD_MEMORY_MAPPING_ADDR_VERSION (0U)
35 #define SRD_MEMORY_MAPPING_ADDR_CTRL (1U)
36 #define SRD_MEMORY_MAPPING_ADDR_STATUS (2U)
37 #define SRD_MEMORY_MAPPING_ADDR_ERROR (3U)
38 #define SRD_MEMORY_MAPPING_ADDR_DEBUG (4U)
39 #define SRD_MEMORY_MAPPING_ADDR_ACTIVATION_DEPTH (5U)
40 #define SRD_MEMORY_MAPPING_ADDR_FILTER_MSB (6U)
41 #define SRD_MEMORY_MAPPING_ADDR_FILTER_LSB (7U)
42 #define SRD_MEMORY_MAPPING_ADDR_CAL_MEAS0_MSB (8U)
43 #define SRD_MEMORY_MAPPING_ADDR_CAL_MEAS0_LSB (9U)
44 #define SRD_MEMORY_MAPPING_ADDR_CAL_MEAS1_MSB (10U)
45 #define SRD_MEMORY_MAPPING_ADDR_CAL_MEAS1_LSB (11U)
46 #define SRD_MEMORY_MAPPING_ADDR_CAL_DEPTH0_MSB (12U)
47 #define SRD_MEMORY_MAPPING_ADDR_CAL_DEPTH0_LSB (13U)
48 #define SRD_MEMORY_MAPPING_ADDR_CAL_DEPTH1_MSB (14U)
49 #define SRD_MEMORY_MAPPING_ADDR_CAL_DEPTH1_LSB (15U)
50 #define SRD_MEMORY_MAPPING_ADDR_CAL_OFFSET_MSB (16U)
51 #define SRD_MEMORY_MAPPING_ADDR_CAL_OFFSET_LSB (17U)
52 #define SRD_MEMORY_MAPPING_ADDR_CAL_CHECKSUM_MSB (18U)
53 #define SRD_MEMORY_MAPPING_ADDR_CAL_CHECKSUM_LSB (19U)
54 #define SRD_MEMORY_MAPPING_ADDR_SERIAL_NUMBER0 (20U)
55 #define SRD_MEMORY_MAPPING_ADDR_SERIAL_NUMBER1 (21U)
56 #define SRD_MEMORY_MAPPING_ADDR_SERIAL_NUMBER2 (22U)
57 #define SRD_MEMORY_MAPPING_ADDR_SERIAL_NUMBER3 (23U)
58 #define SRD_MEMORY_MAPPING_ADDR_SERIAL_NUMBER4 (24U)
59 #define SRD_MEMORY_MAPPING_ADDR_SERIAL_NUMBER5 (25U)
60 #define SRD_MEMORY_MAPPING_ADDR_SERIAL_NUMBER6 (26U)
61 #define SRD_MEMORY_MAPPING_ADDR_SERIAL_NUMBER7 (27U)
62 #define SRD_MEMORY_MAPPING_ADDR_SERIAL_NUMBER8 (28U)
63 #define SRD_MEMORY_MAPPING_ADDR_SERIAL_NUMBER9 (29U)
64 #define SRD_MEMORY_MAPPING_ADDR_CHECKSUM_GENE_MSB (30U)
65 #define SRD_MEMORY_MAPPING_ADDR_CHECKSUM_GENE_LSB (31U)
66 #define SRD_MEMORY_MAPPING_ADDR_BAT_LEVEL_LSB (32U)
67 #define SRD_MEMORY_MAPPING_ADDR_CAP_LEVEL_LSB (33U)
68 #define SRD_MEMORY_MAPPING_ADDR_PERIOD_MSB (34U)
69 #define SRD_MEMORY_MAPPING_ADDR_PERIOD_LSB (35U)
70 #define SRD_MEMORY_MAPPING_ADDR_ANA_PRESS_INIT_MSB (36U)
71 #define SRD_MEMORY_MAPPING_ADDR_ANA_PRESS_INIT_LSB (37U)
72 #define SRD_MEMORY_MAPPING_ADDR_ISENS_INIT_MSB (38U)
73 #define SRD_MEMORY_MAPPING_ADDR_ISENS_INIT_LSB (39U)
74 #define SRD_MEMORY_MAPPING_ADDR_ANA_PRESS_CHECK_MSB (40U)
75 #define SRD_MEMORY_MAPPING_ADDR_ANA_PRESS_CHECK_LSB (41U)
76 #define SRD_MEMORY_MAPPING_ADDR_ISENS_CHECK_MSB (42U)
77 #define SRD_MEMORY_MAPPING_ADDR_ISENS_CHECK_LSB (43U)
78 #define SRD_MEMORY_MAPPING_ADDR_ANA_PRESS_ACTIV_MSB (44U)
79 #define SRD_MEMORY_MAPPING_ADDR_ANA_PRESS_ACTIV_LSB (45U)
80 #define SRD_MEMORY_MAPPING_ADDR_FB_BEFORE_LSB (46U)
81 #define SRD_MEMORY_MAPPING_ADDR_FB_CHECK_LSB (47U)
82 #define SRD_MEMORY_MAPPING_ADDR_ANA_PRESS_MAX_MSB (48U)
83 #define SRD_MEMORY_MAPPING_ADDR_ANA_PRESS_MAX_LSB (49U)
84 #define SRD_MEMORY_MAPPING_ADDR_ANA_PRESS_INIT_MIN_MSB (50U)
85 #define SRD_MEMORY_MAPPING_ADDR_ANA_PRESS_INIT_MIN_LSB (51U)
86 #define SRD_MEMORY_MAPPING_ADDR_ANA_PRESS_INIT_MAX_MSB (52U)
87 #define SRD_MEMORY_MAPPING_ADDR_ANA_PRESS_INIT_MAX_LSB (53U)
88 #define SRD_MEMORY_MAPPING_ADDR_ANA_PRESS_INIT_CHECKSUM (54U)
89 #define SRD_MEMORY_MAPPING_ADDR_MIN_BATTERY_VOLTAGE (55U)
90 #define SRD_MEMORY_MAPPING_ADDR_SRD_NUMBER1 (56U)
91 #define SRD_MEMORY_MAPPING_ADDR_SRD_NUMBER2 (57U)
92 #define SRD_MEMORY_MAPPING_ADDR_SRD_NUMBER3 (58U)
93 #define SRD_MEMORY_MAPPING_ADDR_SRD_NUMBER4 (59U)
94 #define SRD_MEMORY_MAPPING_ADDR_SRD_NUMBER5 (60U)
95 #define SRD_MEMORY_MAPPING_ADDR_SRD_NUMBER6 (61U)
96 #define SRD_MEMORY_MAPPING_ADDR_SRD_NUMBER7 (62U)
97 #define SRD_MEMORY_MAPPING_ADDR_SRD_NUMBER8 (63U)
98 ///@}
99
100 /*----------------------------------------------------------------------------*/
101 /**
102 * \def SRD_MEMORY_NBR_BYTE
103 * \brief Define the number of byte used in the SRD RFID memory.
104 */
105 /*----------------------------------------------------------------------------*/
106 #define SRD_MEMORY_NBR_BYTE (64U)
107
108 /*----------------------------------------------------------------------------*/
109 /**
110 * \def SRD_MEMORY_NBR_BLOCK
111 * \brief Define the number of block used in the SRD RFID memory.
112 */
113 /*----------------------------------------------------------------------------*/
114 #define SRD_MEMORY_NBR_BLOCK (16U)
115 /*############################################################################################*/
116 /*## END DEFINES #############################################################################*/
117 /*############################################################################################*/
118
119
120
121 /*############################################################################################*/
122 /*## TYPEDEF/STRUCT/ENUM/UNION ###############################################################*/
123 /*############################################################################################*/
124 /*----------------------------------------------------------------------------*/
125 /**
126 * \struct tSRDEeprom
127 * \brief Structure used to represent and store SRD RFID memory.
128 */
129 /*----------------------------------------------------------------------------*/
130 typedef struct {
131 unsigned char version; /*!< SRD Firmware revision */
132
133 union {
134 struct {
135 unsigned char RSVD0 : 1; /*!< RESERVED */
136 unsigned char rfAccessInProgress : 1; /*!< RF access in progress flag */
137 unsigned char rfDiag : 1; /*!< Rf Diag flag */
138 unsigned char rfSynchro : 1; /*!< Rf synchro flag */
139 unsigned char RSVD1 : 4; /*!< RESERVED */
140 }bits; /*!< Bit access */
141 unsigned char all; /*!< global byte access */
142 } ctrlModule; /*!< Control module field */
143
144 union {
145 struct {
146 unsigned char RSVD0 : 1; /*!< RESERVED */
147 unsigned char mcuMemoryAccess : 1; /*!< MCU memory access in pogress */
148 unsigned char RSVD1 : 6; /*!< RESERVED */
149 }bits; /*!< Bit access */
150 unsigned char all; /*!< Global byte access */
151 } statusModule; /*!< module status field */
152
153 union {
154 struct {
155 unsigned char output : 1; /*!< Error output load */
156 unsigned char pressure : 1; /*!< Error pressure */
157 unsigned char current : 1; /*!< Error current */
158 unsigned char timer : 1; /*!< Error timer */
159 unsigned char battery : 1; /*!< Error battery */
160 unsigned char supercap : 1; /*!< Error super cap */
161 unsigned char eeprom : 1; /*!< Error EEPROM */
162 unsigned char watchdog : 1; /*!< Error Watchdog */
163 }bits; /*!< Bit access */
164 unsigned char all; /*!< Global byte access */
165 } errorStatus; /*!< Error status field */
166
167 unsigned char debug; /*!< Debug */
168 unsigned char activationDepth; /*!< Activation depth */
169 unsigned char filterMSB; /*!< Filter MSB */
170 unsigned char filterLSB; /*!< Filter LSB */
171 unsigned char calMeas0MSB; /*!< Calibration measure MSB point 0 */
172 unsigned char calMeas0LSB; /*!< Calibration measure LSB point 0 */
173 unsigned char calMeas1MSB; /*!< Calibration measure MSB point 1 */
174 unsigned char calMeas1LSB; /*!< Calibration measure LSB point 1 */
175 unsigned char calDepth0MSB; /*!< Calibration depth MSB point 0 */
176 unsigned char calDepth0LSB; /*!< Calibration depth LSB point 0 */
177 unsigned char calDepth1MSB; /*!< Calibration depth MSB point 1 */
178 unsigned char calDepth1LSB; /*!< Calibration depth LSB point 1 */
179 unsigned char calOffsetMSB; /*!< Calibration offset MSB */
180 unsigned char calOffsetLSB; /*!< Calibration offset lSB */
181 unsigned char calCheckSumMSB; /*!< Calibration checksum MSB */
182 unsigned char calCheckSumLSB; /*!< Calibration checksum LSB */
183 unsigned char serial0; /*!< Serial byte 0 */
184 unsigned char serial1; /*!< Serial byte 1 */
185 unsigned char serial2; /*!< Serial byte 2 */
186 unsigned char serial3; /*!< Serial byte 3 */
187 unsigned char serial4; /*!< Serial byte 4 */
188 unsigned char serial5; /*!< Serial byte 5 */
189 unsigned char serial6; /*!< Serial byte 6 */
190 unsigned char serial7; /*!< Serial byte 7 */
191 unsigned char serial8; /*!< Serial byte 8 */
192 unsigned char serial9; /*!< Serial byte 9 */
193 unsigned char checksumGenMSB; /*!< Checksum MSB */
194 unsigned char checksumGenLSB; /*!< Checksum LSB */
195 unsigned char batLevelLSB; /*!< Battery level */
196 unsigned char capLevelLSB; /*!< Super capacitor level */
197 unsigned char periodMSB; /*!< period MSB */
198 unsigned char periodLSB; /*!< PeriodLSB */
199 unsigned char anaPressInitMSB; /*!< Analog pressure at the startup MSB */
200 unsigned char anaPressInitLSB; /*!< Analog pressure at the startup LSB */
201 unsigned char iSensInitMSB; /*!< iSens at the startup MSB */
202 unsigned char iSensInitLSB; /*!< iSens at the startup LSB */
203 unsigned char anaPressCheckMSB; /*!< Analog pressure check MSB */
204 unsigned char anaPressCheckLSB; /*!< Analog pressure check LSB */
205 unsigned char iSensCheckMSB; /*!< iSens check MSB */
206 unsigned char iSensCheckLSB; /*!< iSens check LSB */
207 unsigned char anaPressActivMSB; /*!< Analog pressure activation MSB */
208 unsigned char anaPressActivLSB; /*!< Analog pressure activation LSB */
209 unsigned char FBBeforeLSB; /*!< Flotation bag before activation LSB */
210 unsigned char FBCehckLSB; /*!< Flotation back check LSB */
211 unsigned char anaPressMaxMSB; /*!< Maximum analog pressure MSB */
212 unsigned char anaPressMaxLSB; /*!< Maximum analog pressure LSB */
213 unsigned char anaPressInitMinMSB; /*!< Analog pressure initialization min MSB */
214 unsigned char anaPressInitMinLSB; /*!< Analog pressure initialization min LSB */
215 unsigned char anaPressInitMaxMSB; /*!< Analog pressure initialization max MSB */
216 unsigned char anaPressInitMaxLSB; /*!< Analog pressure initialization max LSB */
217 unsigned char anaPressInitChecksum; /*!< Analog pressure initialization checksum */
218 unsigned char minBatteryVoltage; /*!< Minimum battery voltage */
219 unsigned char SRDSerial1; /*!< SRD serial byte 0 */
220 unsigned char SRDSerial2; /*!< SRD serial byte 1 */
221 unsigned char SRDSerial3; /*!< SRD serial byte 2 */
222 unsigned char SRDSerial4; /*!< SRD serial byte 3 */
223 unsigned char SRDSerial5; /*!< SRD serial byte 4 */
224 unsigned char SRDSerial6; /*!< SRD serial byte 5 */
225 unsigned char SRDSerial7; /*!< SRD serial byte 6 */
226 unsigned char SRDSerial8; /*!< SRD serial byte 7 */
227 }tSRDEeprom;
228 /*############################################################################################*/
229 /*## END TYPEDEF/STRUCT/ENUM/UNION ###########################################################*/
230 /*############################################################################################*/
231
232
233
234 /*############################################################################################*/
235 /*## VARIABLES ###############################################################################*/
236 /*############################################################################################*/
237
238 /*############################################################################################*/
239 /*## END VARIABLES ###########################################################################*/
240 /*############################################################################################*/
241
242
243
244 /*############################################################################################*/
245 /*## DECLARATION FONCTIONS ###################################################################*/
246 /*############################################################################################*/
247
248 /*############################################################################################*/
249 /*## END DECLARATION FONCTIONS ###############################################################*/
250 /*############################################################################################*/
251 #endif
tSRDEeprom::SRDSerial6
unsigned char SRDSerial6
Definition: SRDMemoryMapping.h:224
tSRDEeprom::serial1
unsigned char serial1
Definition: SRDMemoryMapping.h:184
tSRDEeprom::anaPressActivMSB
unsigned char anaPressActivMSB
Definition: SRDMemoryMapping.h:207
tSRDEeprom::serial9
unsigned char serial9
Definition: SRDMemoryMapping.h:192
tSRDEeprom::calOffsetLSB
unsigned char calOffsetLSB
Definition: SRDMemoryMapping.h:180
tSRDEeprom::serial4
unsigned char serial4
Definition: SRDMemoryMapping.h:187
tSRDEeprom::SRDSerial3
unsigned char SRDSerial3
Definition: SRDMemoryMapping.h:221
tSRDEeprom::serial5
unsigned char serial5
Definition: SRDMemoryMapping.h:188
tSRDEeprom::anaPressInitMaxLSB
unsigned char anaPressInitMaxLSB
Definition: SRDMemoryMapping.h:216
tSRDEeprom::serial0
unsigned char serial0
Definition: SRDMemoryMapping.h:183
tSRDEeprom::serial7
unsigned char serial7
Definition: SRDMemoryMapping.h:190
tSRDEeprom::anaPressCheckLSB
unsigned char anaPressCheckLSB
Definition: SRDMemoryMapping.h:204
tSRDEeprom::anaPressMaxLSB
unsigned char anaPressMaxLSB
Definition: SRDMemoryMapping.h:212
tSRDEeprom::calMeas1MSB
unsigned char calMeas1MSB
Definition: SRDMemoryMapping.h:173
tSRDEeprom::SRDSerial8
unsigned char SRDSerial8
Definition: SRDMemoryMapping.h:226
tSRDEeprom::anaPressInitMaxMSB
unsigned char anaPressInitMaxMSB
Definition: SRDMemoryMapping.h:215
tSRDEeprom::anaPressActivLSB
unsigned char anaPressActivLSB
Definition: SRDMemoryMapping.h:208
tSRDEeprom::iSensCheckLSB
unsigned char iSensCheckLSB
Definition: SRDMemoryMapping.h:206
tSRDEeprom::capLevelLSB
unsigned char capLevelLSB
Definition: SRDMemoryMapping.h:196
tSRDEeprom::calMeas0MSB
unsigned char calMeas0MSB
Definition: SRDMemoryMapping.h:171
tSRDEeprom::checksumGenMSB
unsigned char checksumGenMSB
Definition: SRDMemoryMapping.h:193
tSRDEeprom::minBatteryVoltage
unsigned char minBatteryVoltage
Definition: SRDMemoryMapping.h:218
tSRDEeprom::anaPressMaxMSB
unsigned char anaPressMaxMSB
Definition: SRDMemoryMapping.h:211
tSRDEeprom::anaPressInitChecksum
unsigned char anaPressInitChecksum
Definition: SRDMemoryMapping.h:217
tSRDEeprom::debug
unsigned char debug
Definition: SRDMemoryMapping.h:167
tSRDEeprom::serial3
unsigned char serial3
Definition: SRDMemoryMapping.h:186
tSRDEeprom::serial6
unsigned char serial6
Definition: SRDMemoryMapping.h:189
tSRDEeprom::serial2
unsigned char serial2
Definition: SRDMemoryMapping.h:185
tSRDEeprom::calCheckSumMSB
unsigned char calCheckSumMSB
Definition: SRDMemoryMapping.h:181
tSRDEeprom::calMeas0LSB
unsigned char calMeas0LSB
Definition: SRDMemoryMapping.h:172
tSRDEeprom::calDepth0LSB
unsigned char calDepth0LSB
Definition: SRDMemoryMapping.h:176
tSRDEeprom::filterMSB
unsigned char filterMSB
Definition: SRDMemoryMapping.h:169
tSRDEeprom::FBCehckLSB
unsigned char FBCehckLSB
Definition: SRDMemoryMapping.h:210
tSRDEeprom::version
unsigned char version
Definition: SRDMemoryMapping.h:131
tSRDEeprom::all
unsigned char all
Definition: SRDMemoryMapping.h:141
tSRDEeprom::anaPressCheckMSB
unsigned char anaPressCheckMSB
Definition: SRDMemoryMapping.h:203
tSRDEeprom::SRDSerial7
unsigned char SRDSerial7
Definition: SRDMemoryMapping.h:225
tSRDEeprom::FBBeforeLSB
unsigned char FBBeforeLSB
Definition: SRDMemoryMapping.h:209
tSRDEeprom::calDepth1MSB
unsigned char calDepth1MSB
Definition: SRDMemoryMapping.h:177
tSRDEeprom::calDepth1LSB
unsigned char calDepth1LSB
Definition: SRDMemoryMapping.h:178
tSRDEeprom::filterLSB
unsigned char filterLSB
Definition: SRDMemoryMapping.h:170
tSRDEeprom::periodMSB
unsigned char periodMSB
Definition: SRDMemoryMapping.h:197
tSRDEeprom::iSensInitLSB
unsigned char iSensInitLSB
Definition: SRDMemoryMapping.h:202
tSRDEeprom::serial8
unsigned char serial8
Definition: SRDMemoryMapping.h:191
tSRDEeprom
Structure used to represent and store SRD RFID memory.
Definition: SRDMemoryMapping.h:130
tSRDEeprom::calMeas1LSB
unsigned char calMeas1LSB
Definition: SRDMemoryMapping.h:174
tSRDEeprom::calCheckSumLSB
unsigned char calCheckSumLSB
Definition: SRDMemoryMapping.h:182
tSRDEeprom::anaPressInitMinMSB
unsigned char anaPressInitMinMSB
Definition: SRDMemoryMapping.h:213
tSRDEeprom::checksumGenLSB
unsigned char checksumGenLSB
Definition: SRDMemoryMapping.h:194
tSRDEeprom::anaPressInitMinLSB
unsigned char anaPressInitMinLSB
Definition: SRDMemoryMapping.h:214
tSRDEeprom::SRDSerial5
unsigned char SRDSerial5
Definition: SRDMemoryMapping.h:223
tSRDEeprom::batLevelLSB
unsigned char batLevelLSB
Definition: SRDMemoryMapping.h:195
tSRDEeprom::iSensInitMSB
unsigned char iSensInitMSB
Definition: SRDMemoryMapping.h:201
tSRDEeprom::calDepth0MSB
unsigned char calDepth0MSB
Definition: SRDMemoryMapping.h:175
tSRDEeprom::anaPressInitMSB
unsigned char anaPressInitMSB
Definition: SRDMemoryMapping.h:199
tSRDEeprom::anaPressInitLSB
unsigned char anaPressInitLSB
Definition: SRDMemoryMapping.h:200
tSRDEeprom::SRDSerial1
unsigned char SRDSerial1
Definition: SRDMemoryMapping.h:219
tSRDEeprom::SRDSerial2
unsigned char SRDSerial2
Definition: SRDMemoryMapping.h:220
tSRDEeprom::calOffsetMSB
unsigned char calOffsetMSB
Definition: SRDMemoryMapping.h:179
tSRDEeprom::iSensCheckMSB
unsigned char iSensCheckMSB
Definition: SRDMemoryMapping.h:205
tSRDEeprom::activationDepth
unsigned char activationDepth
Definition: SRDMemoryMapping.h:168
tSRDEeprom::SRDSerial4
unsigned char SRDSerial4
Definition: SRDMemoryMapping.h:222
tSRDEeprom::periodLSB
unsigned char periodLSB
Definition: SRDMemoryMapping.h:198