Advertisement
teplofizik

settings.h

Oct 23rd, 2012
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.80 KB | None | 0 0
  1. // ******************************************************
  2. // settings.h
  3. //
  4. // teplofizik
  5. // ******************************************************
  6.  
  7. #include <stdint.h>
  8. #include <stdbool.h>
  9.  
  10. #ifndef SETTINGS_H_
  11. #define SETTINGS_H_
  12.  
  13.     #define SETTINGS_MAGIC                           0x5A
  14.  
  15.     typedef struct  
  16.     {
  17.         uint8_t Magic; // Для определения наличия настроек (не 0xFF)
  18.        
  19.         // Настройки
  20.     } TSettings;
  21.  
  22.     extern TSettings Settings;
  23.  
  24.     // Загрузка или первоначальная инициализация всех полей настроек
  25.     void settings_Init(void);
  26.  
  27.     // Сохранить настройки
  28.     void settings_Save(void);
  29.  
  30.     // Загрузить настройки
  31.     void settings_Load(void);
  32.  
  33. #endif /* SETTINGS_H_ */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement