Alarm library for use with mbed.
Diff: AlarmTimeDate.h
- Revision:
- 2:23e65cacea5a
- Parent:
- 1:f4c7f13e5553
--- a/AlarmTimeDate.h Sun Oct 31 08:13:17 2010 +0000 +++ b/AlarmTimeDate.h Mon Nov 15 23:22:07 2010 +0000 @@ -19,7 +19,6 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ - #ifndef __ALARM_TIME_DATE_H__ #define __ALARM_TIME_DATE_H__ @@ -40,6 +39,8 @@ * daily skip whilst skipping weekends. * The main program loop needs to call the Tick function below. However the function * does take a SleepFn function pointer which can be used to to sleep the device + * note sleep will be called with interrupts off,the wake interrupt of the RTC + * will wake out of sleep * the class will generate an RTC interrupt when an alarm goes off * Example usage: * \code @@ -133,8 +134,9 @@ */ void SetRepeat(TRepeat aRepeat) { iRepeat = aRepeat; - Tick(NULL,NULL); + Tick(NULL,NULL); } + /** Set pointer to pass to alarm callback function * @param void* aPtr @@ -270,6 +272,10 @@ void* iPtr; AlarmTimeDate* iNext; TRepeat iRepeat; + static volatile uint8_t iRTCIsSet; + static volatile uint8_t iIsrCount; + static volatile uint8_t iPad0; + static volatile uint8_t iPad1; }; #endif //__ALARM_TIME_DATE_H__