1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- #ifndef SYS_API_H_
- #define SYS_API_H_
- #include <stdbool.h>
- #include <stdint.h>
- #define SN_LEN 7
- #define PROD_LEN 20
- #define TS_LEN 16
- #define SN_DEFAULT "0000001"
- typedef struct
- {
- char sn[SN_LEN];
- char prod_date[PROD_LEN];
- char test_state[TS_LEN];
- uint32_t control_word;
- uint32_t crc;
-
- } sys_settings_t;
- bool SYS_BackupInfo(char *mac, char *serial);
- bool SYS_RestoreInfo(sys_settings_t *settings);
- uint32_t SYS_GetCRC(sys_settings_t *settings);
- bool sys_settings_load(sys_settings_t *settings);
- bool sys_save(sys_settings_t *settings);
- void sys_print(sys_settings_t *settings);
- void sys_clear(void);
- #endif
|