Author: lwalter Date: Tue Aug 9 20:30:19 2011 New Revision: 2448 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2448
Log: Add test
Modified: dev/ds1385r.fth
Modified: dev/ds1385r.fth ============================================================================== --- dev/ds1385r.fth Tue Aug 9 20:29:50 2011 (r2447) +++ dev/ds1385r.fth Tue Aug 9 20:30:19 2011 (r2448) @@ -39,6 +39,13 @@ h# 80 constant battery-error-bit [then]
+\ Make sure that the RTC is ticking +: check-tick ( -- error? ) + 0 rtc@ d# 1100 ms 0 rtc@ = dup if + ." RTC did not tick" cr + then +; + \ make sure that the battery is charged - reg D/13 should be 80x : check-battery ( -- error? )
@@ -149,6 +156,7 @@ : selftest ( -- flag ) open drop check-battery \ Don't display the message here because "open" will do it + check-tick or close ;