Advertisement
teplofizik

rtc.h

Mar 29th, 2013
572
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.72 KB | None | 0 0
  1. //
  2. // rtc.h
  3. //
  4.  
  5. #include <stdint.h>
  6. #include <stdbool.h>
  7.  
  8. #ifndef _RTC_H
  9. #define _RTC_H
  10.  
  11.     typedef struct
  12.     {
  13.         uint8_t Year;      // Год
  14.         uint8_t Month;     // Месяц
  15.         uint8_t Day;       // День месяца
  16.        
  17.         uint8_t DayOfWeek; // День недели
  18.        
  19.         uint8_t Hours;     // Часы
  20.         uint8_t Minutes;   // Минуты
  21.         uint8_t Seconds;   // Секунды
  22.     } TDateTime;
  23.  
  24.     // Инициализация модуля
  25.     void rtc_Init(void);
  26.  
  27.     // Сброс состояния часов
  28.     void rtc_Reset(void);
  29.    
  30.     // Получить текущее время
  31.     void rtc_Get(TDateTime * DateTime);
  32.  
  33. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement