Changeset 3408


Ignore:
Timestamp:
Nov 2, 2012, 9:25:58 PM (2 years ago)
Author:
wmb
Message:

OLPC - Converted some GPIO numbers to symbolic names in unused test code for wakeups.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpu/arm/mmp2/wakeups.fth

    r3270 r3408  
    1212\ How to wakeup from SP: 
    1313: setup-key-wakeup  ( -- ) 
    14    d# 24 d# 15 do  h# b0 i af!  loop  \ Wake SoC on game keys 
     14   rotate-gpio# 8 bounds do  h# b0 i af!  loop  \ Wake SoC on game keys 
    1515[ifdef] soc-kbd-clk-gpio# 
    1616   h# 220 soc-kbd-clk-gpio# af!  \ Wake SoC on KBD CLK falling edge 
     
    3131 
    3232: gpio-wakeup?  ( gpio# -- flag ) 
    33    h# 019800 over 5 rshift la+ l@ ( gpio# mask ) 
     33   h# 019800 over 5 rshift la+ io@ ( gpio# mask ) 
    3434   swap h# 1f and                  ( mask bit# ) 
    3535   1 swap lshift  and  0<>         ( flag ) 
     
    3939\ So perhaps the interrupt handler didn't fire 
    4040: rotate-wakeup? ( -- flag )  d#  15 gpio-wakeup?   ; 
    41 : kbd-wakeup?    ( -- flag )  d#  71 gpio-wakeup?   ; 
    42 : tpd-wakeup?    ( -- flag )  d# 160 gpio-wakeup?   ; 
     41: kbd-wakeup?    ( -- flag )  soc-kbd-clk-gpio# gpio-wakeup?   ; 
     42: tpd-wakeup?    ( -- flag )  soc-tpd-clk-gpio# gpio-wakeup?   ; 
    4343 
    4444string-array wakeup-bit-names 
Note: See TracChangeset for help on using the changeset viewer.