Author: wmb Date: Tue Aug 2 20:49:40 2011 New Revision: 2406 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2406
Log: OLPC XO-1.75 trac #10829 - fixed silly mistakes in the compass driver.
Modified: cpu/arm/olpc/1.75/compass.fth
Modified: cpu/arm/olpc/1.75/compass.fth ============================================================================== --- cpu/arm/olpc/1.75/compass.fth Tue Aug 2 20:23:11 2011 (r2405) +++ cpu/arm/olpc/1.75/compass.fth Tue Aug 2 20:49:40 2011 (r2406) @@ -5,7 +5,7 @@ 4 to smb-clock-gpio# 5 to smb-data-gpio# h# 3c to smb-slave - 5 smb-data-gpio# gpio-dir-out + smb-data-gpio# gpio-dir-out ; : smb-init ( -- ) set-compass-slave smb-on smb-pulses ;
@@ -40,11 +40,11 @@ 4 to smb-clock-gpio# 5 to smb-data-gpio# h# 30 to smb-slave - 5 smb-data-gpio# gpio-dir-out + smb-data-gpio# gpio-dir-out ;
: sensor@ ( reg# -- byte ) set-sensor-slave smb-byte@ ; -: sensor! ( byte reg# -- ) set-sensor-slave smb-byte@ ; +: sensor! ( byte reg# -- ) set-sensor-slave smb-byte! ;
: accelerometer-on ( -- ) h# 27 h# 20 sensor! ; : accelerometer-off ( -- ) h# 07 h# 20 sensor! ;