MODIF - Better documentation of alarm matching mode definitions.

git-svn-id: svn+ssh://oldsvn/home/mlalondesvn/svn/cral@11 3ee9b42a-b53c-0410-a25e-f0b6218d5d5b
master
mlalondesvn 17 years ago
parent 03e33bf059
commit ead75702d2

@ -1,10 +1,6 @@
#ifndef staticPrint_H #ifndef staticPrint_H
#define staticPrint_H #define staticPrint_H
#ifndef nop
#define nop() asm volatile ("nop")
#endif
#ifndef SPrint #ifndef SPrint
#define SPrint(str) SPrint_P(PSTR(str)) #define SPrint(str) SPrint_P(PSTR(str))
#endif #endif
@ -18,7 +14,7 @@
#endif #endif
#ifndef SPrint #ifndef SPrint
#define SPrintlnHez(str) SPrintlnHex_P(PSTR(str)) #define SPrintlnHex(str) SPrintlnHex_P(PSTR(str))
#endif #endif
void SPrint_P(const char *data); void SPrint_P(const char *data);

@ -90,21 +90,44 @@
#define DS1337_ALARM_DT_DOW true #define DS1337_ALARM_DT_DOW true
#define DS1337_ALARM_DT_DATE false #define DS1337_ALARM_DT_DATE false
/**
* Alarm 1: Every second
* Alarm 2: Every minute (at 00s)
**/
#define DS1337_ALARM_PERA B00001111 #define DS1337_ALARM_PERA B00001111
#define DS1337_ALARM_PER_SEC DS1337_ALARM_PERA /* Used for alarm 1 only*/ #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*/ #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_SEC B00001110 /* Used for alarm 1 only */
#define DS1337_ALARM_MCH_MIN B00001100 /* Used for alarm 2 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_MINSEC B00001100 /* Used for alarm 1 only */
#define DS1337_ALARM_MCH_HRMIN B00001000 /* Used for alarm 2 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 */ #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_DATEHRMINSEC B00000000 /* Used for alarm 1 only */
#define DS1337_ALARM_MCH_DATEHRMIN B00000000 /* Used for alarm 2 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_DOWHRMINSEC B10000000 /* Used for alarm 1 only */
#define DS1337_ALARM_MCH_DOWHRMIN B10000000 /* Used for alarm 2 only */ #define DS1337_ALARM_MCH_DOWHRMIN B10000000 /* Used for alarm 2 only */

@ -38,5 +38,8 @@ extern "C" {
#ifndef sei #ifndef sei
#define sei() __asm__ __volatile__ ("sei" ::) #define sei() __asm__ __volatile__ ("sei" ::)
#endif #endif
#ifndef nop
#define nop() asm volatile ("nop")
#endif
#endif #endif

Loading…
Cancel
Save