Changeset 3004
- Timestamp:
- Jun 7, 2012 8:05:24 AM (12 months ago)
- File:
-
- 1 edited
-
dev/usb2/hcd/ehci/probe.fth (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dev/usb2/hcd/ehci/probe.fth
r2746 r3004 61 61 ; 62 62 63 \ Port owned by usb 1.1 controller (2000) or device is present (1) 63 64 : port-connected? ( port# -- flag ) portsc@ h# 2001 and ; 64 65 : wait-connect ( port# -- error? ) … … 154 155 ; 155 156 157 : .occupied ( port -- ) ." USB 2.0 port " u. ." in use" cr ; 158 : regs{ ( -- prev ) ehci-reg dup 0= if map-regs then ; 159 : }regs ( prev -- ) 0= if unmap-regs then ; 160 161 : fisheye ( -- ) 162 regs{ 163 #testable-ports 0 ?do 164 i port-connected? if 165 i .occupied 166 else 167 ." Fisheye pattern out to USB 2.0 port " i u. cr 168 i test-port-begin 169 d# 2,000 ms 170 i test-port-end 171 0 i portsc! i reset-port i power-port 172 then 173 loop 174 }regs 175 ; 176 177 : thorough ( -- error? ) 178 #testable-ports 0 ?do 179 i port-connected? if 180 i .occupied 181 else 182 ." Please connect a device to USB port " i u. cr 183 i wait-connect if true unloop exit then 184 then 185 loop 186 false 187 ; 188 189 : sagacity ( -- error? ) 190 #testable-ports 0 ?do 191 ." USB port " i u. ." ... " 192 i port-connected? if 193 i wait-connect if true unloop exit then 194 else 195 ." Empty" cr 196 then 197 loop 198 false 199 ; 200 156 201 : selftest ( -- error? ) 157 ehci-reg dup 0= if map-regs then 158 159 #testable-ports 0 ?do 160 i port-connected? if \ Port owned by usb 1.1 controller (2000) or device is present (1) 161 ." USB 2.0 port " i u. ." in use" cr 162 else 163 diagnostic-mode? if 164 ." Please connect a device to USB port " i u. cr 165 i wait-connect if true unloop exit then 166 else 167 ." Fisheye pattern out to USB 2.0 port " i u. cr 168 i test-port-begin 169 d# 2,000 ms 170 i test-port-end 171 0 i portsc! i reset-port i power-port 172 then 173 then 174 loop 175 0= if unmap-regs then 176 false 202 regs{ ( prev ) 203 diagnostic-mode? if 204 thorough 205 else 206 sagacity 207 then ( prev error? ) 208 swap }regs ( error? ) 177 209 ; 178 210
Note: See TracChangeset
for help on using the changeset viewer.
