Changeset 2688
- Timestamp:
- Nov 15, 2011 2:14:11 AM (18 months ago)
- Files:
-
- 2 edited
-
cpu/x86/pc/olpc/gamekeys.fth (modified) (1 diff)
-
ofw/core/ofwcore.fth (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cpu/x86/pc/olpc/gamekeys.fth
r2387 r2688 35 35 : game-key? ( mask -- flag ) game-key-mask and 0<> ; 36 36 37 : (hold-message) ( ms -- ) 37 : gamekey-pause-message ( decisecs -- decisecs' ) 38 button-rotate game-key@ and if ( decisecs ) 39 (cr ." Release the game button to continue" ( decisecs ) 40 begin button-rotate game-key@ and while d# 100 ms repeat 41 (cr kill-line ( decisecs ) 42 drop 0 ( decisecs' ) 43 then ( decisecs ) 44 ; 45 ' gamekey-pause-message to pause-message 46 47 : olpc-hold-message 38 48 [ifdef] test-station 39 test-station 1 5 between if drop exit then49 test-station 1 5 between if drop false exit then 40 50 [then] 41 d# 100 / ( decisecs ) 42 begin dup while ( decisecs ) 43 dup d# 10 /mod swap if drop else (cr .d then ( decisecs ) 44 d# 100 ms ( decisecs ) 45 1- ( decisecs ) 46 button-rotate game-key@ and if ( decisecs ) 47 (cr ." Release the game button to continue" 48 begin button-rotate game-key@ and while d# 100 ms repeat 49 (cr kill-line 50 drop exit 51 then 52 repeat 53 drop (cr kill-line 51 (hold-message) 52 (cr kill-line 54 53 ; 55 ' (hold-message)to hold-message54 ' olpc-hold-message to hold-message 56 55 57 56 : bypass-bios-boot? ( -- flag ) button-square game-key? ; -
ofw/core/ofwcore.fth
r2610 r2688 3257 3257 ; 3258 3258 3259 : flush-keyboard ( -- ) begin key? while key drop repeat ; 3260 defer pause-message ( decisecs -- decisecs' ) ' noop to pause-message 3259 3261 defer hold-message 3260 ' ms to hold-message 3261 3262 : most-tests ( -- ) 3263 method-name 2@ current-device (search-wordlist) if ( xt ) 3262 : (hold-message) ( ms -- exit? ) 3263 flush-keyboard 3264 d# 100 / ( decisecs ) 3265 begin dup while ( decisecs ) 3266 dup d# 10 /mod swap if drop else (cr .d then ( decisecs ) 3267 d# 100 ms 1- ( decisecs' ) 3268 pause-message ( decisecs ) 3269 key? if ( decisecs ) 3270 key h# 1b = if ( decisecs ) 3271 cr ." Selftest stopped from keyboard" cr ( decisecs ) 3272 drop true exit ( -- true ) 3273 then ( decisecs ) 3274 then ( decisecs ) 3275 repeat ( decisecs ) 3276 drop false ( false ) 3277 ; 3278 ' (hold-message) to hold-message 3279 3280 : most-tests ( -- exit? ) 3281 " selftest" current-device (search-wordlist) if ( xt ) 3264 3282 3265 3283 drop ( ) … … 3275 3293 3276 3294 ??cr ." Testing " pwd 3277 method-name 2@ current-device( method-adr,len phandle )3295 " selftest" current-device ( method-adr,len phandle ) 3278 3296 execute-phandle-method if ( result ) 3279 3297 ?dup if … … 3281 3299 ??cr ." Selftest failed. Return code = " .d cr 3282 3300 black-letters 3283 d# 10000 hold-message3301 d# 10000 ( delay-ms ) 3284 3302 else 3285 3303 green-letters 3286 3304 ." Okay" cr 3287 3305 black-letters 3288 d# 2000 hold-message3289 then 3306 d# 2000 ( delay-ms ) 3307 then ( delay-ms ) 3290 3308 else 3291 3309 red-letters 3292 3310 ." Selftest failed due to abort" cr 3293 3311 black-letters 3294 d# 10000 hold-message 3295 then 3296 then ( ) 3312 d# 10000 ( delay-ms ) 3313 then ( delay-ms ) 3314 hold-message ( exit? ) 3315 else 3316 false ( exit? ) 3317 then ( exit? ) 3318 ; 3319 3320 \ "action-acf" is executed for each device node in the subtree 3321 \ rooted at dev-addr,len , with current-device set to the 3322 \ node in question. "action-acf" can perform arbitrary tests 3323 \ on the node to determine if that node is appropriate for 3324 \ the action that it wished to undertake. 3325 3326 : test-subtree ( dev-addr,len -- ) 3327 current-device >r ( dev-addr,len r: phandle ) 3328 find-device ( r: phandle xt ) 3329 ['] most-tests ['] (search-preorder) catch 2drop ( r: phandle xt ) 3330 r> push-device ( ) 3297 3331 ; 3298 3332 3299 3333 : test-all ( -- ) 3300 3334 optional-arg-or-/$ 3301 " selftest" method-name 2! 3302 ['] most-tests scan-subtree 3335 test-subtree 3303 3336 ; 3304 3337
Note: See TracChangeset
for help on using the changeset viewer.
