[openfirmware] [commit] r3150 - cpu/arm/olpc
repository service
svn at openfirmware.info
Fri Aug 10 07:23:01 CEST 2012
Author: quozl
Date: Fri Aug 10 07:23:01 2012
New Revision: 3150
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3150
Log:
OLPC CL4 - Neonode, set GPIO directions, add missing early exit
Modified:
cpu/arm/olpc/nn-touchscreen.fth
Modified: cpu/arm/olpc/nn-touchscreen.fth
==============================================================================
--- cpu/arm/olpc/nn-touchscreen.fth Fri Aug 10 07:20:13 2012 (r3149)
+++ cpu/arm/olpc/nn-touchscreen.fth Fri Aug 10 07:23:01 2012 (r3150)
@@ -10,15 +10,19 @@
fload ${BP}/cpu/arm/olpc/touchscreen-common.fth
+: set-gpios
+ touch-rst-gpio# dup gpio-set gpio-dir-out
+ touch-tck-gpio# dup gpio-clr gpio-dir-out
+;
: reset ( -- ) touch-rst-gpio# dup gpio-clr gpio-set d# 250 ms ;
-: no-data? ( -- false | true ) touch-scr-gpio# gpio-pin@ ;
+: no-data? ( -- no-data? ) touch-scr-gpio# gpio-pin@ ;
d# 250 constant /packet
/packet buffer: packet
0 value packet-size
-: in? ( -- false | true )
- no-data? if false then
+: in? ( -- got-data? )
+ no-data? if false exit then
packet 2 " twsi-read" $call-parent ( )
packet 1+ c@ ( size )
@@ -69,6 +73,7 @@
: open ( -- okay? )
my-unit " set-address" $call-parent
+ set-gpios
no-data? if reset then
no-data? if false exit then
['] configure catch if false exit then
More information about the openfirmware
mailing list