| 1 |
|
| 2 |
|
| 3 |
#ifndef ATLAS_VPD_H |
| 4 |
#define ATLAS_VPD_H |
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
#include <types.h> |
| 13 |
|
| 14 |
#define VPD_MAGIC 0x56504453 |
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
#define VPD_LATEST_REVISION 1 |
| 22 |
|
| 23 |
struct __packed emi_eeprom_vpd_header { |
| 24 |
uint32_t magic; |
| 25 |
uint8_t revision; |
| 26 |
uint8_t _rfu[15]; |
| 27 |
}; |
| 28 |
|
| 29 |
|
| 30 |
enum atlas_profile { |
| 31 |
ATLAS_PROF_UNPROGRAMMED = 0, |
| 32 |
ATLAS_PROF_DEFAULT = 1, |
| 33 |
ATLAS_PROF_REALTIME_PERFORMANCE = 2, |
| 34 |
ATLAS_PROF_THEMIS_LED_CONFIG = 3, |
| 35 |
}; |
| 36 |
|
| 37 |
#define ATLAS_SN_PN_LENGTH 20 |
| 38 |
|
| 39 |
struct __packed emi_eeprom_vpd { |
| 40 |
struct emi_eeprom_vpd_header header; |
| 41 |
char serial_number[ATLAS_SN_PN_LENGTH]; |
| 42 |
char part_number[ATLAS_SN_PN_LENGTH]; |
| 43 |
uint16_t profile; |
| 44 |
}; |
| 45 |
|
| 46 |
|
| 47 |
const struct emi_eeprom_vpd *get_emi_eeprom_vpd(void); |
| 48 |
|
| 49 |
#endif |