[openfirmware] [commit] r3302 - cpu/arm/olpc
repository service
svn at openfirmware.info
Wed Sep 12 08:06:31 CEST 2012
Author: quozl
Date: Wed Sep 12 08:06:31 2012
New Revision: 3302
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3302
Log:
OLPC XO-4 - Neonode, use a red-yellow-green pseudocolour map for watch-fss and watch-fll, leave the greyscale mode available for visually challenged
Modified:
cpu/arm/olpc/nn-touchscreen.fth
Modified: cpu/arm/olpc/nn-touchscreen.fth
==============================================================================
--- cpu/arm/olpc/nn-touchscreen.fth Mon Sep 10 13:33:13 2012 (r3301)
+++ cpu/arm/olpc/nn-touchscreen.fth Wed Sep 12 08:06:31 2012 (r3302)
@@ -544,10 +544,15 @@
fill-rectangle-noff ( )
;
-: level>colour ( signal-value -- colour )
- d# 3 rshift dup d# 5 lshift over d# 11 lshift or or
+: >grey ( level -- colour ) dup dup rgb>565 ;
+
+: >pseudo ( level -- colour ) \ a red-yellow-green pseudocolour bar
+ d# 256 over - 2* d# 255 min swap 2* d# 255 min 0 rgb>565
;
+defer level>rgb
+' >pseudo is level>rgb
+
: ys>xy ( signal# -- x y )
yx swap ( x signal# )
screen-h yleds 2* / * ( x y )
@@ -569,7 +574,7 @@
0 value axis#
: draw-signal ( signal# level -- x y )
- level>colour pixcolor ! ( signal# )
+ level>rgb pixcolor ! ( signal# )
axis# if ( signal# ) \ y
ys>xy
else ( signal# ) \ x
More information about the openfirmware
mailing list