pabigot / bsp430

Board Support Package for MSP430 microcontrollers
http://pabigot.github.com/bsp430
BSD 3-Clause "New" or "Revised" License
38 stars 11 forks source link

clean up alarms at times near now and in past #67

Closed pabigot closed 11 years ago

pabigot commented 11 years ago

The current alarm infrastructure has a baroque scheme based on a future limit and a late limit to determine when a scheduled alarm is in the past or if it is due so soon it might be missed before the hardware can be updated. Junk all that and just use signed comparisons, requiring that settings be no more than half the maximum clock value away from the current time.