Changeset 3504
- Timestamp:
- Dec 31, 2012 11:43:11 AM (5 months ago)
- Location:
- cpu/arm/olpc
- Files:
-
- 2 edited
-
4.0/nn-version.fth (modified) (1 diff)
-
nn-touchscreen.fth (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cpu/arm/olpc/4.0/nn-version.fth
r3437 r3504 1 1 \ The Neonode touchscreen firmware 2 macro: NN_VERSION 0_0_0_ 82 macro: NN_VERSION 0_0_0_9 -
cpu/arm/olpc/nn-touchscreen.fth
r3502 r3504 112 112 dup get-msecs - 0< ( id limit timeout? ) 113 113 until ( id limit ) 114 2drop ( ) 114 drop ( id ) 115 ." timeout waiting for " 2u.x cr ( ) 116 r> rstrace >r 117 pbuf /pbuf erase 118 ; 119 120 : ?id-abort ( id $message -- ) 121 rot pbuf 2+ c@ <> if 122 pbuf plen cdump 123 r> rstrace >r 124 cr 125 $abort 126 else 127 2drop 128 then 115 129 ; 116 130 … … 121 135 : flush-input ( -- ) 122 136 begin 123 0 0 anticipate 124 pbuf 2+ c@ h# 07 = if ?missing then 137 in? if 138 pbuf 2+ c@ h# 07 = if ?missing then 139 then 125 140 no-data? 126 141 until … … 128 143 129 144 : read-boot-complete ( -- ) 130 0 pbuf 2+ c! 131 h# 07 d# 0 anticipate 132 pbuf 2+ c@ h# 07 <> abort" response other than boot complete" 133 ?missing 134 ; 145 in? if 146 h# 07 " response other than boot complete" ?id-abort 147 ?missing 148 then 149 ; 150 135 151 136 152 : read-version 137 153 h# 1e h# 01 h# ee 3 bytes-out h# 1e d# 100 anticipate 138 pbuf 2+ c@ h# 1e <> abort" response other than status"154 h# 1e " response other than status" ?id-abort 139 155 pbuf 9 + le-w@ pbuf 7 + le-w@ wljoin pbuf 5 + le-w@ pbuf 3 + le-w@ wljoin 140 156 to version# … … 152 168 153 169 : deactivate ( -- ) 154 h# 00 h# 01 h# ee 3 bytes-out h# 00 d# 60 anticipate170 h# 00 h# 01 h# ee 3 bytes-out h# 00 d# 100 anticipate 155 171 ; 156 172 157 173 : deconfigure ( -- ) 158 deactivate 159 true to configure? 174 configure? 0= if 175 deactivate 176 true to configure? 177 then 160 178 ; 161 179 … … 217 235 218 236 : stream-poll? ( -- false | x y buttons true ) 219 0 pbuf 2+ c!220 237 in? if 221 238 \ FIXME: only handles one subpacket … … 246 263 6 0 do 247 264 h# 40 h# 0 h# 0f 3 h# ee 5 bytes-out \ fss full level 248 0 pbuf 2+ c!249 265 h# 0f d# 130 anticipate 250 266 pbuf 2+ c@ dup 0= abort" missing response after fixed signal strength" … … 406 422 : test-os-axis ( axis -- ) 407 423 h# 21 h# 02 h# ee 4 bytes-out 408 h# 21 d# 60 anticipate409 pbuf 2+ c@ h# 21 <> abort" response other than open short"424 h# 21 d# 100 anticipate 425 h# 21 " response other than open short" ?id-abort 410 426 411 427 pbuf d# 5 + ( addr ) … … 467 483 d# 64 swap h# 0f h# 03 h# ee 5 bytes-out 468 484 h# 0f d# 60 anticipate 469 pbuf 2+ c@ h# 0f <> abort" response other than fixed signal strength"485 h# 0f " response other than fixed signal strength" ?id-abort 470 486 8sp 471 487 push-decimal … … 602 618 h# 0d h# 02 h# ee 4 bytes-out 603 619 h# 0d d# 200 anticipate 604 pbuf 2+ c@ h# 0d <> abort" response other than low signals"620 h# 0d " response other than low signals" ?id-abort 605 621 606 622 8sp … … 1011 1027 1012 1028 1029 : (lg-tooling) test-os test-fll ; 1030 1013 1031 : lg-tooling ( -- error? ) 1014 open if test-os test-fll else fault then 1032 open if 1033 ['] (lg-tooling) catch ?dup if .error fault then 1034 else 1035 fault 1036 then 1015 1037 faults 1016 1038 close … … 1019 1041 : ir-pcb-smt ( -- error? ) 1020 1042 hold-reset connect 1021 open if test-os else fault then 1043 open if 1044 ['] test-os catch ?dup if .error fault then 1045 else 1046 fault 1047 then 1022 1048 close 1023 1049 hold-reset disconnect … … 1028 1054 hold-reset connect 1029 1055 open if 1030 test-fll 1031 faults 0= if test-adjacent-axes then 1056 ['] test-fll catch ?dup if .error fault then 1057 faults 0= if 1058 ['] test-adjacent-axes catch ?dup if .error fault then 1059 then 1032 1060 else 1033 1061 fault … … 1040 1068 : mb-smt ( -- error? ) 1041 1069 open 0= if true exit then 1042 show-version1070 ['] show-version catch ?dup if .error fault then 1043 1071 close 1044 fa lse1072 faults 1045 1073 ; 1046 1074 1047 1075 : mb-assy ( -- error? ) 1048 1076 open 0= if true exit then 1049 test-adjacent-axes1077 ['] test-adjacent-axes catch ?dup if .error fault then 1050 1078 close 1051 1079 faults
Note: See TracChangeset
for help on using the changeset viewer.
