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
master
mlalondesvn 17 years ago
parent 6f7bf7408b
commit 03e33bf059

@ -494,14 +494,14 @@ void DS1337::alarmChecks(void)
{ {
if (getRegisterBit(DS1337_STATUS, DS1337_STATUS_A1F)) if (getRegisterBit(DS1337_STATUS, DS1337_STATUS_A1F))
{ {
unsetRegister(DS1337_STATUS, DS1337_STATUS_A1F); delay(10);
if (DS1337callbackFunc[0]) DS1337callbackFunc[0](); if (DS1337callbackFunc[0]) DS1337callbackFunc[0]();
unsetRegister(DS1337_STATUS, DS1337_STATUS_A1F);
} }
if (getRegisterBit(DS1337_STATUS, DS1337_STATUS_A2F)) if (getRegisterBit(DS1337_STATUS, DS1337_STATUS_A2F))
{ {
unsetRegister(DS1337_STATUS, DS1337_STATUS_A2F); delay(10);
if (DS1337callbackFunc[1]) DS1337callbackFunc[1](); if (DS1337callbackFunc[1]) DS1337callbackFunc[1]();
unsetRegister(DS1337_STATUS, DS1337_STATUS_A2F);
} }
return; return;

Loading…
Cancel
Save