From 03e33bf05914f13df0e3eafd4e766c8e0a0ddf3f Mon Sep 17 00:00:00 2001 From: mlalondesvn Date: Thu, 18 Oct 2007 05:32:17 +0000 Subject: [PATCH] DS1337: MODIF - Interrupt flags are now set low only after the callback execution has completed git-svn-id: svn+ssh://oldsvn/home/mlalondesvn/svn/cral@10 3ee9b42a-b53c-0410-a25e-f0b6218d5d5b --- ds1337/ds1337.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ds1337/ds1337.cpp b/ds1337/ds1337.cpp index c5453b5..c1aa0a7 100644 --- a/ds1337/ds1337.cpp +++ b/ds1337/ds1337.cpp @@ -494,14 +494,14 @@ void DS1337::alarmChecks(void) { if (getRegisterBit(DS1337_STATUS, DS1337_STATUS_A1F)) { - unsetRegister(DS1337_STATUS, DS1337_STATUS_A1F); delay(10); if (DS1337callbackFunc[0]) DS1337callbackFunc[0](); + unsetRegister(DS1337_STATUS, DS1337_STATUS_A1F); } if (getRegisterBit(DS1337_STATUS, DS1337_STATUS_A2F)) { - unsetRegister(DS1337_STATUS, DS1337_STATUS_A2F); delay(10); if (DS1337callbackFunc[1]) DS1337callbackFunc[1](); + unsetRegister(DS1337_STATUS, DS1337_STATUS_A2F); } return;