Author: rsmith Date: 2010-01-13 00:49:05 +0100 (Wed, 13 Jan 2010) New Revision: 1663
Modified: cpu/x86/pc/olpc/rtcwake.fth Log: OLPC: Enhance the autowak functions with extra checks
- Often people forget that they need to specify the wakeup time as an argument so try to check for the case when the numbers are obviously wrong. - Run sci-wakeup as well since people forget.
Modified: cpu/x86/pc/olpc/rtcwake.fth =================================================================== --- cpu/x86/pc/olpc/rtcwake.fth 2010-01-12 23:49:03 UTC (rev 1662) +++ cpu/x86/pc/olpc/rtcwake.fth 2010-01-12 23:49:05 UTC (rev 1663) @@ -75,7 +75,13 @@ ;
: autowack-test ( ms -- ) + dup 0< if ." Delay can't be negative. Did you forget to provide it?" cr + drop exit + then + dup ." Setting autowack delay to " .d ." ms " cr + ." Press x to exit" cr autowack-delay + sci-wakeup autowack-on 0 begin s @@ -88,7 +94,12 @@
\ for testing wakeups from the EC : wackup-test-ec ( ms -- ) + dup 0< if ." Delay can't be negative. Did you forget to provide it?" cr + drop exit + then + dup ." Setting autowack delay to " .d ." ms " cr ." Press x to exit" cr + sci-wakeup d# 3000 autowack-delay \ At small ms delays the host can miss the SCI so this \ is the back up. 0 begin ( ms count )
openfirmware@openfirmware.info