Medidor Online de Temperatura y Humedad de Bajo Consumo
1
Trabajo Fin de Carrera
PƔgina principal
Estructuras de Datos
Archivos
Lista de archivos
Globales
rtc.h
Ir a la documentación de este archivo.
1
/****************************************************************************
2
* $Id:: rtc.h 5743 2010-11-30 23:18:58Z usb00423 $
3
* Project: NXP LPC17xx RTC example
4
*
5
* Description:
6
* This file contains RTC code header definition.
7
*
8
****************************************************************************
9
* Software that is described herein is for illustrative purposes only
10
* which provides customers with programming information regarding the
11
* products. This software is supplied "AS IS" without any warranties.
12
* NXP Semiconductors assumes no responsibility or liability for the
13
* use of the software, conveys no license or title under any patent,
14
* copyright, or mask work right to the product. NXP Semiconductors
15
* reserves the right to make changes in the software without
16
* notification. NXP Semiconductors also make no representation or
17
* warranty that such application will be suitable for the specified
18
* use without further testing or modification.
19
****************************************************************************/
20
#ifndef __RTC_H
21
#define __RTC_H
22
23
typedef
struct
{
24
uint32_t
RTC_Sec
;
/* Second value - [0,59] */
25
uint32_t
RTC_Min
;
/* Minute value - [0,59] */
26
uint32_t
RTC_Hour
;
/* Hour value - [0,23] */
27
uint32_t
RTC_Mday
;
/* Day of the month value - [1,31] */
28
uint32_t
RTC_Mon
;
/* Month value - [1,12] */
29
uint32_t
RTC_Year
;
/* Year value - [0,4095] */
30
uint32_t
RTC_Wday
;
/* Day of week value - [0,6] */
31
uint32_t
RTC_Yday
;
/* Day of year value - [1,365] */
32
}
RTCTime
;
33
34
#define IMSEC 0x00000001
35
#define IMMIN 0x00000002
36
#define IMHOUR 0x00000004
37
#define IMDOM 0x00000008
38
#define IMDOW 0x00000010
39
#define IMDOY 0x00000020
40
#define IMMON 0x00000040
41
#define IMYEAR 0x00000080
42
43
#define AMRSEC 0x00000001
/* Alarm mask for Seconds */
44
#define AMRMIN 0x00000002
/* Alarm mask for Minutes */
45
#define AMRHOUR 0x00000004
/* Alarm mask for Hours */
46
#define AMRDOM 0x00000008
/* Alarm mask for Day of Month */
47
#define AMRDOW 0x00000010
/* Alarm mask for Day of Week */
48
#define AMRDOY 0x00000020
/* Alarm mask for Day of Year */
49
#define AMRMON 0x00000040
/* Alarm mask for Month */
50
#define AMRYEAR 0x00000080
/* Alarm mask for Year */
51
52
#define PREINT_RTC 0x000001C8
/* Prescaler value, integer portion,
53
PCLK = 15Mhz */
54
#define PREFRAC_RTC 0x000061C0
/* Prescaler value, fraction portion,
55
PCLK = 15Mhz */
56
#define ILR_RTCCIF 0x01
57
#define ILR_RTCALF 0x02
58
59
#define CCR_CLKEN 0x01
60
#define CCR_CTCRST 0x02
61
#define CCR_CLKSRC 0x10
62
63
extern
void
RTC_IRQHandler
(
void
);
64
extern
void
RTCInit
(
void
);
65
extern
void
RTCStart
(
void
);
66
extern
void
RTCStop
(
void
);
67
extern
void
RTC_CTCReset
(
void
);
68
extern
void
RTCSetTime
(
RTCTime
);
69
extern
RTCTime
RTCGetTime
(
void
);
70
extern
void
RTCSetAlarm
(
RTCTime
);
71
extern
void
RTCSetAlarmMask
( uint32_t AlarmMask );
72
73
#endif
/* end __RTC_H */
74
/*****************************************************************************
75
** End Of File
76
******************************************************************************/
TFC_Library
inc_priv
rtc.h
Generado el Lunes, 3 de Junio de 2013 23:33:36 para Medidor Online de Temperatura y Humedad de Bajo Consumo por
1.8.4