/
ds2417.h
26 lines (19 loc) · 901 Bytes
/
ds2417.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __DS2417_H
#define __DS2417_H
/* Includes ------------------------------------------------------------------*/
#include "utils.h"
#include "onewire.h"
#define START_YEAR 1970
#define DAY_PER_YEAR 365
#define SEC_PER_DAY 86400
#define SEC_PER_HOUR 3600
#define SEC_PER_MINUTE 60
/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */
void ConvertDateTime(uint32_t datetime, RTC_TimeTypeDef* RTC_TimeStruct, RTC_DateTypeDef* RTC_DateStruct);
void owSetDate(uint8_t *idbuf);
uint32_t owGetDate(uint8_t *idbuf);
#endif /* __DS2417_H */