Changeset 3132


Ignore:
Timestamp:
Aug 8, 2012, 7:36:09 AM (3 years ago)
Author:
quozl
Message:

ARM - TWSI, twsi-write takes an address and length, twsi-out takes bytes on stack, but both achieve the same

Location:
cpu/arm
Files:
4 edited

Legend:

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

    r1987 r3132  
    6969: init-pals  ( -- )
    7070   h# b0 4 set-twsi-target  \ Set PS parameters address
    71    0 1 twsi-write     \ clear interrupt settings
     71   0 1 twsi-out             \ clear interrupt settings
    7272
    7373   h# 22 4 set-twsi-target  \ Device init address
    74    h# 10 1 twsi-write \ Init device
     74   h# 10 1 twsi-out        \ Init device
    7575
    7676   h# 20 4 set-twsi-target  \ Ambient Light Sensor address
    77    2 1 twsi-write     \ Enable ALS in most sensitive mode, 16-bit data
     77   2 1 twsi-out             \ Enable ALS in most sensitive mode, 16-bit data
    7878;
    7979: als@  ( -- n )
  • cpu/arm/mmp2/dsi.fth

    r2390 r3132  
    77
    88: dsi-twsi!  ( l reg# -- )
    9    >r  lbsplit  swap 2swap swap  r> wbsplit  6  twsi-write
     9   >r  lbsplit  swap 2swap swap  r> wbsplit  6  twsi-out
    1010;
    1111: dsi-twsi-w!  ( w reg# -- )
    12    >r  wbsplit  swap  r> wbsplit  4  twsi-write
     12   >r  wbsplit  swap  r> wbsplit  4  twsi-out
    1313;
    1414: dsi-twsi@  ( reg# -- l )  wbsplit 2 4 twsi-get  bljoin  ;
  • cpu/arm/mmp2/twsi.fth

    r3023 r3132  
    146146;
    147147: twsi-write  ( adr len -- )
    148    0=  if  exit  then                 ( adr len )
     148   dup 0=  if  2drop exit  then       ( adr len )
    149149   slave-address twsi-start           ( adr len )
    150150
  • cpu/arm/mmp3/thunderstone/boardtwsi.fth

    r3073 r3132  
    6969: init-pals  ( -- )
    7070   h# b0 4 set-twsi-target  \ Set PS parameters address
    71    0 1 twsi-write     \ clear interrupt settings
     71   0 1 twsi-out             \ clear interrupt settings
    7272
    7373   h# 22 4 set-twsi-target  \ Device init address
    74    h# 10 1 twsi-write \ Init device
     74   h# 10 1 twsi-out        \ Init device
    7575
    7676   h# 20 4 set-twsi-target  \ Ambient Light Sensor address
    77    2 1 twsi-write     \ Enable ALS in most sensitive mode, 16-bit data
     77   2 1 twsi-out             \ Enable ALS in most sensitive mode, 16-bit data
    7878;
    7979: als@  ( -- n )
Note: See TracChangeset for help on using the changeset viewer.