-
Notifications
You must be signed in to change notification settings - Fork 12
/
SensorRTC.h
49 lines (33 loc) · 868 Bytes
/
SensorRTC.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef SENSOR_RTC
#define SENSOR_RTC
#include <Arduino.h>
#include <SPI.h>
#include <Wire.h>
// -------- Uncomment the sensor to be used --------
#define USE_RCTInt
//--------------------------------------------------
#ifdef USE_RCTInt
#include "RTCInt.h"
#endif
class SensorRTC
{
public:
//Public Functions
SensorRTC();
int begin(); // Begin the Pressure sensor selected (return 0 if ok, return 1 if erro)
void configRTC(); // Config RTC
void clearRTCAlarm(); // Clear RTC alarm state
int getRTCAlarm(); // Return RTC alarm state (return 0 if alarm macth, return 1 if erro)
//Public Variables
private:
#ifdef USE_RCTInt
RTCInt rtc; // Define RTC object
void ISR_RTC();
static void isr2();
static SensorRTC * SensorRTC_instance;
volatile unsigned int alarme;
#endif
//Private Functions
//Private Variables
};
#endif