first cut at turnon scripts for EasyTimer v2
[fw/altos] / ao-tools / lib / ao-eeprom-read.h
1 /*
2  * Copyright © 2017 Keith Packard <keithp@keithp.com>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * General Public License for more details.
13  */
14
15 #ifndef _AO_EEPROM_READ_H_
16 #define _AO_EEPROM_READ_H_
17
18 #include <stdint.h>
19 #include <stdio.h>
20 #include <ao-ms5607.h>
21
22 #define AO_MAX_CALLSIGN 8
23 #define AO_AES_LEN      16
24 #define AO_PYRO_NUM     8
25
26 /* required functions from the underlying log system */
27
28 #define AO_LOG_FORMAT_UNKNOWN           0       /* unknown; altosui will have to guess */
29 #define AO_LOG_FORMAT_FULL              1       /* 8 byte typed log records */
30 #define AO_LOG_FORMAT_TINY              2       /* two byte state/baro records */
31 #define AO_LOG_FORMAT_TELEMETRY         3       /* 32 byte ao_telemetry records */
32 #define AO_LOG_FORMAT_TELESCIENCE       4       /* 32 byte typed telescience records */
33 #define AO_LOG_FORMAT_TELEMEGA_OLD      5       /* 32 byte typed telemega records */
34 #define AO_LOG_FORMAT_EASYMINI1         6       /* 16-byte MS5607 baro only, 3.0V supply */
35 #define AO_LOG_FORMAT_TELEMETRUM        7       /* 16-byte typed telemetrum records */
36 #define AO_LOG_FORMAT_TELEMINI2         8       /* 16-byte MS5607 baro only, 3.3V supply, cc1111 SoC */
37 #define AO_LOG_FORMAT_TELEGPS           9       /* 32 byte telegps records */
38 #define AO_LOG_FORMAT_TELEMEGA          10      /* 32 byte typed telemega records with 32 bit gyro cal */
39 #define AO_LOG_FORMAT_DETHERM           11      /* 16-byte MS5607 baro only, no ADC */
40 #define AO_LOG_FORMAT_TELEMINI3         12      /* 16-byte MS5607 baro only, 3.3V supply, stm32f042 SoC */
41 #define AO_LOG_FORMAT_TELEFIRETWO       13      /* 32-byte test stand data */
42 #define AO_LOG_FORMAT_EASYMINI2         14      /* 16-byte MS5607 baro only, 3.3V supply, stm32f042 SoC */
43 #define AO_LOG_FORMAT_TELEMEGA_3        15      /* 32 byte typed telemega records with 32 bit gyro cal and mpu9250 */
44 #define AO_LOG_FORMAT_EASYMEGA_2        16      /* 32 byte typed telemega records with 32 bit gyro cal, mpu9250 rotated 90° and adxl375 */
45 #define AO_LOG_FORMAT_TELESTATIC        17      /* 32 byte typed telestatic records */
46 #define AO_LOG_FORMAT_MICROPEAK2        18      /* 2-byte baro values with header */
47 #define AO_LOG_FORMAT_TELEMEGA_4        19      /* 32 byte typed telemega records with 32 bit gyro cal and Bmx160 */
48 #define AO_LOG_FORMAT_EASYMOTOR         20      /* 16 byte typed easymotor records with pressure sensor and adxl375 */
49 #define AO_LOG_FORMAT_TELEMEGA_5        21      /* 32 byte typed telemega records with 32 bit gyro cal, mpu6000 and mmc5983 */
50 #define AO_LOG_FORMAT_TELEMEGA_6        22      /* 32 byte typed telemega records with 32 bit gyro cal, bmi088 and mmc5983 */
51 #define AO_LOG_FORMAT_NONE              127     /* No log at all */
52
53 enum ao_pyro_flag {
54         ao_pyro_none                    = 0x00000000,
55
56         ao_pyro_accel_less              = 0x00000001,
57         ao_pyro_accel_greater           = 0x00000002,
58
59         ao_pyro_speed_less              = 0x00000004,
60         ao_pyro_speed_greater           = 0x00000008,
61
62         ao_pyro_height_less             = 0x00000010,
63         ao_pyro_height_greater          = 0x00000020,
64
65         ao_pyro_orient_less             = 0x00000040,
66         ao_pyro_orient_greater          = 0x00000080,
67
68         ao_pyro_time_less               = 0x00000100,
69         ao_pyro_time_greater            = 0x00000200,
70
71         ao_pyro_ascending               = 0x00000400,
72         ao_pyro_descending              = 0x00000800,
73
74         ao_pyro_after_motor             = 0x00001000,
75
76         ao_pyro_delay                   = 0x00002000,
77
78         ao_pyro_state_less              = 0x00004000,
79         ao_pyro_state_greater_or_equal  = 0x00008000,
80 };
81
82 struct ao_pyro {
83         enum ao_pyro_flag       flags;
84         int16_t                 accel_less, accel_greater;
85         int16_t                 speed_less, speed_greater;
86         int16_t                 height_less, height_greater;
87         int16_t                 orient_less, orient_greater;
88         int16_t                 time_less, time_greater;
89         int16_t                 delay;
90         uint8_t                 state_less, state_greater_or_equal;
91         int16_t                 motor;
92         uint16_t                delay_done;
93         uint8_t                 _unused;        /* was 'fired' */
94 };
95
96 struct ao_config {
97         uint8_t         major;
98         uint8_t         minor;
99         uint16_t        main_deploy;
100         int16_t         accel_plus_g;           /* changed for minor version 2 */
101         uint8_t         _legacy_radio_channel;
102         char            callsign[AO_MAX_CALLSIGN + 1];
103         uint8_t         apogee_delay;           /* minor version 1 */
104         int16_t         accel_minus_g;          /* minor version 2 */
105         uint32_t        radio_cal;              /* minor version 3 */
106         uint32_t        flight_log_max;         /* minor version 4 */
107         uint8_t         ignite_mode;            /* minor version 5 */
108         uint8_t         pad_orientation;        /* minor version 6 */
109         uint32_t        radio_setting;          /* minor version 7 */
110         uint8_t         radio_enable;           /* minor version 8 */
111         uint8_t         aes_key[AO_AES_LEN];    /* minor version 9 */
112         uint32_t        frequency;              /* minor version 10 */
113         uint16_t        apogee_lockout;         /* minor version 11 */
114         struct ao_pyro  pyro[AO_PYRO_NUM];      /* minor version 12 */
115         uint16_t        aprs_interval;          /* minor version 13 */
116         uint8_t         radio_power;            /* minor version 14 */
117         uint8_t         radio_amp;              /* minor version 14 */
118         int16_t         accel_zero_along;       /* minor version 15 */
119         int16_t         accel_zero_across;      /* minor version 15 */
120         int16_t         accel_zero_through;     /* minor version 15 */
121         uint8_t         mid_beep;               /* minor version 16 */
122         uint16_t        tracker_motion;         /* minor version 17 */
123         uint8_t         tracker_interval;       /* minor version 17 */
124         uint16_t        pyro_time;              /* minor version 18 */
125         uint8_t         aprs_ssid;              /* minor version 19 */
126         uint8_t         radio_rate;             /* minor version 20 */
127         uint32_t        send_frequency;         /* minor version 21 */
128         uint8_t         aprs_format;            /* minor version 22 */
129         uint8_t         pad_box;                /* minor version 22 */
130         uint8_t         pad_idle;               /* minor version 23 */
131 };
132
133 /*
134  * ao_log_big.c
135  */
136
137 /*
138  * The data log is recorded in the eeprom as a sequence
139  * of data packets.
140  *
141  * Each packet starts with a 4-byte header that has the
142  * packet type, the packet checksum and the tick count. Then
143  * they all contain 2 16 bit values which hold packet-specific
144  * data.
145  *
146  * For each flight, the first packet
147  * is FLIGHT packet, indicating the serial number of the
148  * device and a unique number marking the number of flights
149  * recorded by this device.
150  *
151  * During flight, data from the accelerometer and barometer
152  * are recorded in SENSOR packets, using the raw 16-bit values
153  * read from the A/D converter.
154  *
155  * Also during flight, but at a lower rate, the deployment
156  * sensors are recorded in DEPLOY packets. The goal here is to
157  * detect failure in the deployment circuits.
158  *
159  * STATE packets hold state transitions as the flight computer
160  * transitions through different stages of the flight.
161  */
162 #define AO_LOG_FLIGHT           'F'
163 #define AO_LOG_SENSOR           'A'
164 #define AO_LOG_TEMP_VOLT        'T'
165 #define AO_LOG_DEPLOY           'D'
166 #define AO_LOG_STATE            'S'
167 #define AO_LOG_GPS_TIME         'G'
168 #define AO_LOG_GPS_LAT          'N'
169 #define AO_LOG_GPS_LON          'W'
170 #define AO_LOG_GPS_ALT          'H'
171 #define AO_LOG_GPS_SAT          'V'
172 #define AO_LOG_GPS_DATE         'Y'
173 #define AO_LOG_GPS_POS          'P'
174
175 #define AO_LOG_POS_NONE         (~0UL)
176
177 /* Common header in all log formats */
178 struct ao_log_header {
179         char                    type;                           /* 0 */
180         uint8_t                 csum;                           /* 1 */
181         uint16_t                tick;                           /* 2 */
182 };
183
184 struct ao_log_record {
185         char                    type;                           /* 0 */
186         uint8_t                 csum;                           /* 1 */
187         uint16_t                tick;                           /* 2 */
188         union {
189                 struct {
190                         int16_t         ground_accel;           /* 4 */
191                         uint16_t        flight;                 /* 6 */
192                 } flight;
193                 struct {
194                         int16_t         accel;                  /* 4 */
195                         int16_t         pres;                   /* 6 */
196                 } sensor;
197                 struct {
198                         int16_t         temp;
199                         int16_t         v_batt;
200                 } temp_volt;
201                 struct {
202                         int16_t         drogue;
203                         int16_t         main;
204                 } deploy;
205                 struct {
206                         uint16_t        state;
207                         uint16_t        reason;
208                 } state;
209                 struct {
210                         uint8_t         hour;
211                         uint8_t         minute;
212                         uint8_t         second;
213                         uint8_t         flags;
214                 } gps_time;
215                 int32_t         gps_latitude;
216                 int32_t         gps_longitude;
217                 struct {
218                         uint16_t        altitude_low;
219                         int16_t         altitude_high;
220                 } gps_altitude;
221                 struct {
222                         uint16_t        svid;
223                         uint8_t         unused;
224                         uint8_t         c_n;
225                 } gps_sat;
226                 struct {
227                         uint8_t         year;
228                         uint8_t         month;
229                         uint8_t         day;
230                         uint8_t         extra;
231                 } gps_date;
232                 struct {
233                         uint16_t        d0;
234                         uint16_t        d1;
235                 } anon;
236         } u;
237 };
238
239 struct ao_log_mega {
240         char                    type;                   /* 0 */
241         uint8_t                 csum;                   /* 1 */
242         uint16_t                tick;                   /* 2 */
243         union {                                         /* 4 */
244                 /* AO_LOG_FLIGHT */
245                 struct {
246                         uint16_t        flight;                 /* 4 */
247                         int16_t         ground_accel;           /* 6 */
248                         uint32_t        ground_pres;            /* 8 */
249                         int16_t         ground_accel_along;     /* 12 */
250                         int16_t         ground_accel_across;    /* 14 */
251                         int16_t         ground_accel_through;   /* 16 */
252                         int16_t         pad_18;                 /* 18 */
253                         int32_t         ground_roll;            /* 20 */
254                         int32_t         ground_pitch;           /* 24 */
255                         int32_t         ground_yaw;             /* 28 */
256                 } flight;                                       /* 32 */
257                 struct {
258                         uint16_t        flight;                 /* 4 */
259                         int16_t         ground_accel;           /* 6 */
260                         uint32_t        ground_pres;            /* 8 */
261                         int16_t         ground_accel_along;     /* 12 */
262                         int16_t         ground_accel_across;    /* 14 */
263                         int16_t         ground_accel_through;   /* 16 */
264                         int16_t         ground_roll;            /* 18 */
265                         int16_t         ground_pitch;           /* 20 */
266                         int16_t         ground_yaw;             /* 22 */
267                 } flight_old;                                   /* 24 */
268                 /* AO_LOG_STATE */
269                 struct {
270                         uint16_t        state;
271                         uint16_t        reason;
272                 } state;
273                 /* AO_LOG_SENSOR */
274                 struct {
275                         uint32_t        pres;           /* 4 */
276                         uint32_t        temp;           /* 8 */
277                         int16_t         accel_x;        /* 12 */
278                         int16_t         accel_y;        /* 14 */
279                         int16_t         accel_z;        /* 16 */
280                         int16_t         gyro_x;         /* 18 */
281                         int16_t         gyro_y;         /* 20 */
282                         int16_t         gyro_z;         /* 22 */
283                         int16_t         mag_x;          /* 24 */
284                         int16_t         mag_z;          /* 26 */
285                         int16_t         mag_y;          /* 28 */
286                         int16_t         accel;          /* 30 */
287                 } sensor;       /* 32 */
288                 /* AO_LOG_TEMP_VOLT */
289                 struct {
290                         int16_t         v_batt;         /* 4 */
291                         int16_t         v_pbatt;        /* 6 */
292                         int16_t         n_sense;        /* 8 */
293                         int16_t         sense[10];      /* 10 */
294                         uint16_t        pyro;           /* 30 */
295                 } volt;                                 /* 32 */
296                 /* AO_LOG_GPS_TIME */
297                 struct {
298                         int32_t         latitude;       /* 4 */
299                         int32_t         longitude;      /* 8 */
300                         uint16_t        altitude_low;   /* 12 */
301                         uint8_t         hour;           /* 14 */
302                         uint8_t         minute;         /* 15 */
303                         uint8_t         second;         /* 16 */
304                         uint8_t         flags;          /* 17 */
305                         uint8_t         year;           /* 18 */
306                         uint8_t         month;          /* 19 */
307                         uint8_t         day;            /* 20 */
308                         uint8_t         course;         /* 21 */
309                         uint16_t        ground_speed;   /* 22 */
310                         int16_t         climb_rate;     /* 24 */
311                         uint8_t         pdop;           /* 26 */
312                         uint8_t         hdop;           /* 27 */
313                         uint8_t         vdop;           /* 28 */
314                         uint8_t         mode;           /* 29 */
315                         int16_t         altitude_high;  /* 30 */
316                 } gps;  /* 32 */
317                 /* AO_LOG_GPS_SAT */
318                 struct {
319                         uint16_t        channels;       /* 4 */
320                         struct {
321                                 uint8_t svid;
322                                 uint8_t c_n;
323                         } sats[12];                     /* 6 */
324                 } gps_sat;                              /* 30 */
325         } u;
326 };
327
328 #define AO_LOG_MEGA_GPS_ALTITUDE(l)     ((int32_t) ((l)->u.gps.altitude_high << 16) | ((l)->u.gps.altitude_low))
329 #define AO_LOG_MEGA_SET_GPS_ALTITUDE(l,a)       (((l)->u.gps.mode |= AO_GPS_MODE_ALTITUDE_24), \
330                                                  ((l)->u.gps.altitude_high = (a) >> 16), \
331                                                  (l)->u.gps.altitude_low = (a))
332
333 struct ao_log_firetwo {
334         char                    type;                   /* 0 */
335         uint8_t                 csum;                   /* 1 */
336         uint16_t                tick;                   /* 2 */
337         union {                                         /* 4 */
338                 /* AO_LOG_FLIGHT */
339                 struct {
340                         uint16_t        flight;         /* 4 */
341                 } flight;       /* 6 */
342                 /* AO_LOG_STATE */
343                 struct {
344                         uint16_t        state;          /* 4 */
345                         uint16_t        reason;         /* 6 */
346                 } state;        /* 8 */
347                 /* AO_LOG_SENSOR */
348                 struct {
349                         uint16_t        pressure;       /* 4 */
350                         uint16_t        thrust;         /* 6 */
351                         uint16_t        thermistor[4];  /* 8 */
352                 } sensor;       /* 24 */
353                 uint8_t         align[28];              /* 4 */
354         } u;    /* 32 */
355 };
356
357 struct ao_log_telestatic {
358         char                    type;                   /* 0 */
359         uint8_t                 csum;                   /* 1 */
360         uint16_t                tick;                   /* 2 */
361         union {                                         /* 4 */
362                 /* AO_LOG_FLIGHT */
363                 struct {
364                         uint16_t        flight;         /* 4 */
365                 } flight;       /* 6 */
366                 /* AO_LOG_STATE */
367                 struct {
368                         uint16_t        state;          /* 4 */
369                         uint16_t        reason;         /* 6 */
370                 } state;        /* 8 */
371                 /* AO_LOG_SENSOR */
372                 struct {
373                         uint32_t        pressure;       /* 4 */
374                         uint32_t        pressure2;      /* 8 */
375                         uint32_t        thrust;         /* 12 */
376                         uint32_t        mass;           /* 16 */
377                         uint16_t        t_low;          /* 20 */
378                         uint16_t        t_high[4];      /* 22 */
379                 } sensor;       /* 30 */
380                 uint8_t         align[28];              /* 4 */
381         } u;    /* 32 */
382 };
383
384 struct ao_log_metrum {
385         char                    type;                   /* 0 */
386         uint8_t                 csum;                   /* 1 */
387         uint16_t                tick;                   /* 2 */
388         union {                                         /* 4 */
389                 /* AO_LOG_FLIGHT */
390                 struct {
391                         uint16_t        flight;         /* 4 */
392                         int16_t         ground_accel;   /* 6 */
393                         uint32_t        ground_pres;    /* 8 */
394                         uint32_t        ground_temp;    /* 12 */
395                 } flight;       /* 16 */
396                 /* AO_LOG_STATE */
397                 struct {
398                         uint16_t        state;          /* 4 */
399                         uint16_t        reason;         /* 6 */
400                 } state;        /* 8 */
401                 /* AO_LOG_SENSOR */
402                 struct {
403                         uint32_t        pres;           /* 4 */
404                         uint32_t        temp;           /* 8 */
405                         int16_t         accel;          /* 12 */
406                 } sensor;       /* 14 */
407                 /* AO_LOG_TEMP_VOLT */
408                 struct {
409                         int16_t         v_batt;         /* 4 */
410                         int16_t         sense_a;        /* 6 */
411                         int16_t         sense_m;        /* 8 */
412                 } volt;         /* 10 */
413                 /* AO_LOG_GPS_POS */
414                 struct {
415                         int32_t         latitude;       /* 4 */
416                         int32_t         longitude;      /* 8 */
417                         uint16_t        altitude_low;   /* 12 */
418                         int16_t         altitude_high;  /* 14 */
419                 } gps;          /* 16 */
420                 /* AO_LOG_GPS_TIME */
421                 struct {
422                         uint8_t         hour;           /* 4 */
423                         uint8_t         minute;         /* 5 */
424                         uint8_t         second;         /* 6 */
425                         uint8_t         flags;          /* 7 */
426                         uint8_t         year;           /* 8 */
427                         uint8_t         month;          /* 9 */
428                         uint8_t         day;            /* 10 */
429                         uint8_t         pdop;           /* 11 */
430                 } gps_time;     /* 12 */
431                 /* AO_LOG_GPS_SAT (up to three packets) */
432                 struct {
433                         uint8_t channels;               /* 4 */
434                         uint8_t more;                   /* 5 */
435                         struct {
436                                 uint8_t svid;
437                                 uint8_t c_n;
438                         } sats[4];                      /* 6 */
439                 } gps_sat;                              /* 14 */
440                 uint8_t         raw[12];                /* 4 */
441         } u;    /* 16 */
442 };
443
444 struct ao_log_mini {
445         char            type;                           /* 0 */
446         uint8_t         csum;                           /* 1 */
447         uint16_t        tick;                           /* 2 */
448         union {                                         /* 4 */
449                 /* AO_LOG_FLIGHT */
450                 struct {
451                         uint16_t        flight;         /* 4 */
452                         uint16_t        r6;
453                         uint32_t        ground_pres;    /* 8 */
454                 } flight;
455                 /* AO_LOG_STATE */
456                 struct {
457                         uint16_t        state;          /* 4 */
458                         uint16_t        reason;         /* 6 */
459                 } state;
460                 /* AO_LOG_SENSOR */
461                 struct {
462                         uint8_t         pres[3];        /* 4 */
463                         uint8_t         temp[3];        /* 7 */
464                         int16_t         sense_a;        /* 10 */
465                         int16_t         sense_m;        /* 12 */
466                         int16_t         v_batt;         /* 14 */
467                 } sensor;                               /* 16 */
468         } u;                                            /* 16 */
469 };                                                      /* 16 */
470
471 #define ao_log_pack24(dst,value) do {           \
472                 (dst)[0] = (value);             \
473                 (dst)[1] = (value) >> 8;        \
474                 (dst)[2] = (value) >> 16;       \
475         } while (0)
476
477 struct ao_log_gps {
478         char                    type;                   /* 0 */
479         uint8_t                 csum;                   /* 1 */
480         uint16_t                tick;                   /* 2 */
481         union {                                         /* 4 */
482                 /* AO_LOG_FLIGHT */
483                 struct {
484                         uint16_t        flight;                 /* 4 */
485                         int16_t         start_altitude;         /* 6 */
486                         int32_t         start_latitude;         /* 8 */
487                         int32_t         start_longitude;        /* 12 */
488                 } flight;                                       /* 16 */
489                 /* AO_LOG_GPS_TIME */
490                 struct {
491                         int32_t         latitude;       /* 4 */
492                         int32_t         longitude;      /* 8 */
493                         uint16_t        altitude_low;   /* 12 */
494                         uint8_t         hour;           /* 14 */
495                         uint8_t         minute;         /* 15 */
496                         uint8_t         second;         /* 16 */
497                         uint8_t         flags;          /* 17 */
498                         uint8_t         year;           /* 18 */
499                         uint8_t         month;          /* 19 */
500                         uint8_t         day;            /* 20 */
501                         uint8_t         course;         /* 21 */
502                         uint16_t        ground_speed;   /* 22 */
503                         int16_t         climb_rate;     /* 24 */
504                         uint8_t         pdop;           /* 26 */
505                         uint8_t         hdop;           /* 27 */
506                         uint8_t         vdop;           /* 28 */
507                         uint8_t         mode;           /* 29 */
508                         int16_t         altitude_high;  /* 30 */
509                 } gps;  /* 31 */
510                 /* AO_LOG_GPS_SAT */
511                 struct {
512                         uint16_t        channels;       /* 4 */
513                         struct {
514                                 uint8_t svid;
515                                 uint8_t c_n;
516                         } sats[12];                     /* 6 */
517                 } gps_sat;                              /* 30 */
518         } u;
519 };
520
521 struct ao_log_motor {
522         char                    type;                   /* 0 */
523         uint8_t                 csum;                   /* 1 */
524         uint16_t                tick;                   /* 2 */
525         union {                                         /* 4 */
526                 /* AO_LOG_FLIGHT */
527                 struct {
528                         uint16_t        flight;                 /* 4 */
529                         int16_t         ground_accel;           /* 6 */
530                         int16_t         ground_accel_along;     /* 8 */
531                         int16_t         ground_accel_across;    /* 10 */
532                         int16_t         ground_accel_through;   /* 12 */
533                         int16_t         ground_motor_pressure;  /* 14 */
534                 } flight;                                       /* 16 */
535                 /* AO_LOG_STATE */
536                 struct {
537                         uint16_t        state;                  /* 4 */
538                         uint16_t        reason;                 /* 6 */
539                 } state;
540                 /* AO_LOG_SENSOR */
541                 struct {
542                         uint16_t        pressure;               /* 4 */
543                         uint16_t        v_batt;                 /* 6 */
544                         int16_t         accel;                  /* 8 */
545                         int16_t         accel_across;           /* 10 */
546                         int16_t         accel_along;            /* 12 */
547                         int16_t         accel_through;          /* 14 */
548                 } sensor;                                       /* 16 */
549         } u;
550 };
551
552 struct ao_eeprom {
553         struct ao_config        config;
554         struct ao_ms5607_prom   ms5607_prom;
555         int                     log_format;
556         uint16_t                serial_number;
557         uint8_t                 *data;
558         uint32_t                len;
559 };
560
561 struct ao_eeprom *ao_eeprom_read(FILE *file);
562
563 struct ao_eeprom *ao_eeprom_read_old(FILE *file);
564
565 void ao_eeprom_free_data(struct ao_eeprom *ao_eeprom);
566
567 #endif /* _AO_EEPROM_READ_H_ */