altos: Remove 8051 address space specifiers
[fw/altos] / src / test / 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 #define const
19
20 #include <stdint.h>
21 #include <stdio.h>
22 #include <ao_telemetry.h>
23 #include <ao_config.h>
24 #include <ao_ms5607.h>
25 #include <ao_log.h>
26
27 struct ao_eeprom {
28         struct ao_config        config;
29         struct ao_ms5607_prom   ms5607_prom;
30         int                     log_format;
31         uint16_t                serial_number;
32         uint8_t                 *data;
33         uint32_t                len;
34         uint32_t                size;
35 };
36
37 struct ao_eeprom *ao_eeprom_read(FILE *file);
38
39 struct ao_eeprom *ao_eeprom_read_old(FILE *file);
40
41 void ao_eeprom_free_data(struct ao_eeprom *ao_eeprom);
42
43 #endif /* _AO_EEPROM_READ_H_ */