Thanks for the patch. I've included the fix for the RTC and SPI calculation, plus the typo's in var_io.h Andrew