Changeset 2281


Ignore:
Timestamp:
Jun 15, 2011, 7:36:02 AM (4 years ago)
Author:
rsmith
Message:

XO-1 Add bat_reset support

Needs special EC code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • dev/olpc/kb3700/battery.fth

    r2179 r2281  
    88
    99\ Names try to match the variable names in EC code
     10
     11h# F780  constant ec-bProcessOneWireIndex
     12h# F7CF  constant ec-bHDQ_ACCESS_FLAG2
     13
    1014h# FA00  constant ec-rambase
    1115h# 01    constant ec-pwr_limit
    1216h# 09    constant ec-va2
    1317h# 20    constant ec-platformID
     18h# A5    constant ec-mBAT_STATUS
    1419
    1520h# FC00  constant ec-gpiobase
     
    522527   until
    523528   drop
     529;
     530
     531\ Instruct the EC to completely reset the battery
     532\ subsystem. (XO-1 F series EC code)
     533
     534: (bat-reset) ( -- )
     535   1 ec-bHDQ_ACCESS_FLAG2    ec!
     536   4 ec-bProcessOneWireIndex ec!
    524537;
    525538
     
    711724   drop
    712725   bat-disable-charge
     726;
     727
     728: bat-reset
     729   batman-init?
     730   (bat-reset)
     731   batman-stop
    713732;
    714733
Note: See TracChangeset for help on using the changeset viewer.