123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- #ifndef SYS_API_H_
- #define SYS_API_H_
- #include <stdbool.h>
- #include <stdint.h>
- #ifndef DEVICE_MAC
- #define DEVICE_MAC "EC-4C-4D-00-C7-FF"
- #endif
- #ifndef DEVICE_SERIAL
- #define DEVICE_SERIAL "7023000"
- #endif
- #define SYS_MAC DEVICE_MAC
- #define SYS_SERIAL DEVICE_SERIAL
- #define SYS_CUSTOMER "Rotek"
- #define MAC_LEN 18
- #define SER_LEN 16
- #define CUST_LEN 16
- #define PROD_LEN 20
- typedef struct
- {
- char mac[MAC_LEN];
- char serial[SER_LEN];
- char customer[CUST_LEN];
- char proddate[PROD_LEN];
- char testState[16];
- uint32_t controlword;
- uint32_t crc;
- } SYS_t;
- bool SYS_BackupInfo(char *mac, char *serial);
- bool SYS_RestoreInfo(SYS_t *settings);
- uint32_t SYS_GetCRC(SYS_t *settings);
- bool SYS_Load(SYS_t *settings);
- bool SYS_Save(SYS_t *settings);
- #endif
|