From ead75702d253ee0622c9d1deb9c7527ddf1fc6b4 Mon Sep 17 00:00:00 2001 From: mlalondesvn Date: Thu, 18 Oct 2007 17:35:15 +0000 Subject: [PATCH] DS1337: MODIF - Better documentation of alarm matching mode definitions. git-svn-id: svn+ssh://oldsvn/home/mlalondesvn/svn/cral@11 3ee9b42a-b53c-0410-a25e-f0b6218d5d5b --- SPrint/staticPrint.h | 6 +----- ds1337/ds1337.h | 23 +++++++++++++++++++++++ global.h | 3 +++ 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/SPrint/staticPrint.h b/SPrint/staticPrint.h index 3e27014..a1feb99 100644 --- a/SPrint/staticPrint.h +++ b/SPrint/staticPrint.h @@ -1,10 +1,6 @@ #ifndef staticPrint_H #define staticPrint_H -#ifndef nop - #define nop() asm volatile ("nop") -#endif - #ifndef SPrint #define SPrint(str) SPrint_P(PSTR(str)) #endif @@ -18,7 +14,7 @@ #endif #ifndef SPrint - #define SPrintlnHez(str) SPrintlnHex_P(PSTR(str)) + #define SPrintlnHex(str) SPrintlnHex_P(PSTR(str)) #endif void SPrint_P(const char *data); diff --git a/ds1337/ds1337.h b/ds1337/ds1337.h index e4bf7a1..9c269c1 100644 --- a/ds1337/ds1337.h +++ b/ds1337/ds1337.h @@ -90,21 +90,44 @@ #define DS1337_ALARM_DT_DOW true #define DS1337_ALARM_DT_DATE false +/** + * Alarm 1: Every second + * Alarm 2: Every minute (at 00s) +**/ #define DS1337_ALARM_PERA B00001111 #define DS1337_ALARM_PER_SEC DS1337_ALARM_PERA /* Used for alarm 1 only*/ #define DS1337_ALARM_PER_MIN DS1337_ALARM_PERA /* Used for alarm 2 only*/ +/** + * Alarm 1: Match second + * Alarm 2: Match minute +**/ #define DS1337_ALARM_MCH_SEC B00001110 /* Used for alarm 1 only */ #define DS1337_ALARM_MCH_MIN B00001100 /* Used for alarm 2 only */ +/** + * Alarm 1: Match minutes and seconds + * Alarm 2: Match hours and minutes +**/ #define DS1337_ALARM_MCH_MINSEC B00001100 /* Used for alarm 1 only */ #define DS1337_ALARM_MCH_HRMIN B00001000 /* Used for alarm 2 only */ +/** + * Alarm 1: Match hour, minute and second +**/ #define DS1337_ALARM_MCH_HRMINSEC B00001000 /* Used for alarm 1 only */ +/** + * Alarm 1: Match date, hour, minute, second + * Alarm 2: Match da,te hour, minute +**/ #define DS1337_ALARM_MCH_DATEHRMINSEC B00000000 /* Used for alarm 1 only */ #define DS1337_ALARM_MCH_DATEHRMIN B00000000 /* Used for alarm 2 only */ +/** + * Alarm 1: Match day of the week, hour, minute, second + * Alarm 2: Match day of the week, hour, minute +**/ #define DS1337_ALARM_MCH_DOWHRMINSEC B10000000 /* Used for alarm 1 only */ #define DS1337_ALARM_MCH_DOWHRMIN B10000000 /* Used for alarm 2 only */ diff --git a/global.h b/global.h index a5c261e..8c62ccd 100644 --- a/global.h +++ b/global.h @@ -38,5 +38,8 @@ extern "C" { #ifndef sei #define sei() __asm__ __volatile__ ("sei" ::) #endif +#ifndef nop + #define nop() asm volatile ("nop") +#endif #endif