Changeset 3115


Ignore:
Timestamp:
Aug 3, 2012, 7:19:13 AM (21 months ago)
Author:
wmb
Message:

OLPC ARM - New convenience functions for setting bit fields in I/O registers.

File:
1 edited

Legend:

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

    r3046 r3115  
    1515: io-set  ( mask offset -- )  dup io@  rot or  swap io!  ; 
    1616: io-clr  ( mask offset -- )  dup io@  rot invert and  swap io!  ; 
     17: io-fld  ( clr-mask set-mask offset -- )  >r r@ io@  rot invert and  or  r> io!  ; 
    1718 
    1819: icu@  ( offset -- value )  +icu io@  ; 
     
    2425: pmua@  ( offset -- l )  +pmua io@  ; 
    2526: pmua!  ( l offset -- )  +pmua io!  ; 
     27 
     28: pmua-set  ( bits reg# -- )  +pmua io-set  ; 
     29: pmua-clr  ( bits reg# -- )  +pmua io-clr  ; 
     30: pmua-fld  ( clr set reg# -- )  +pmua io-fld  ; 
    2631 
    2732: apbc@  ( offset -- l )  +apbc io@  ; 
Note: See TracChangeset for help on using the changeset viewer.