[openfirmware] [commit] r3151 - cpu/arm/olpc
repository service
svn at openfirmware.info
Fri Aug 10 15:54:47 CEST 2012
Author: quozl
Date: Fri Aug 10 15:54:46 2012
New Revision: 3151
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3151
Log:
OLPC CL4 - Neonode, change reset method, fix call parent misuse
Modified:
cpu/arm/olpc/nn-touchscreen.fth
Modified: cpu/arm/olpc/nn-touchscreen.fth
==============================================================================
--- cpu/arm/olpc/nn-touchscreen.fth Fri Aug 10 07:23:01 2012 (r3150)
+++ cpu/arm/olpc/nn-touchscreen.fth Fri Aug 10 15:54:46 2012 (r3151)
@@ -24,20 +24,20 @@
: in? ( -- got-data? )
no-data? if false exit then
- packet 2 " twsi-read" $call-parent ( )
+ packet 2 twsi-read ( )
packet 1+ c@ ( size )
dup 2+ to packet-size ( size )
- packet 2+ swap " twsi-read" $call-parent ( )
+ packet 2+ swap twsi-read ( )
true
;
-: out ( byte ... bytes# -- ) " twsi-out" $call-parent ;
+: out ( byte ... bytes# -- ) twsi-out ;
defer process
' noop to process
-: expect ( id msecs -- )
+: anticipate ( id msecs -- )
get-msecs + ( id limit )
begin
in? if
@@ -50,32 +50,34 @@
2drop ( )
;
-: read-boot-complete ( -- ) h# 07 d# 10 expect ;
+: read-boot-complete ( -- ) h# 07 d# 20 anticipate ;
-: initialise ( -- ) h# ee h# 01 h# 01 3 out h# 01 d# 10 expect ;
+: initialise ( -- ) h# ee h# 01 h# 01 3 out h# 01 d# 20 anticipate ;
: set-resolution ( -- )
set-geometry
h# ee h# 05 h# 02 screen-w wbsplit screen-h wbsplit 7 out
- h# 02 d# 10 expect
+ h# 02 d# 20 anticipate
;
: start ( -- ) h# ee h# 01 h# 04 3 out ;
-: deactivate ( -- ) h# ee h# 01 h# 00 3 out h# 00 d# 10 expect ;
+: deactivate ( -- ) h# ee h# 01 h# 00 3 out h# 00 d# 20 anticipate ;
: configure ( -- )
- read-boot-complete
initialise
set-resolution
start
;
: open ( -- okay? )
- my-unit " set-address" $call-parent
+ my-unit set-twsi-target
set-gpios
- no-data? if reset then
- no-data? if false exit then
+ no-data? if
+ reset
+ no-data? if false exit then
+ read-boot-complete
+ then
['] configure catch if false exit then
true
;
@@ -103,6 +105,8 @@
." No touchscreen present" cr false exit
then
+ ." dumping events from touchscreen controller, press a key to stop" cr
+
\ FIXME: graphically show data on screen until key
begin
in? if
More information about the openfirmware
mailing list