Changeset 3009
- Timestamp:
- Jun 15, 2012 3:52:54 AM (11 months ago)
- Location:
- dev/usb2/device/net
- Files:
-
- 3 edited
-
ax8817x.fth (modified) (4 diffs)
-
common.fth (modified) (1 diff)
-
ethernet.fth (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dev/usb2/device/net/ax8817x.fth
r2954 r3009 180 180 ; 181 181 182 : ax-stop-phy ( -- )183 ax88772? if184 h# 40 ax-sw-reset \ Power off internal PHY, reset external one (08 == 0)185 then186 ;187 182 : select-phy ( -- ) 188 183 ax88772? if … … 242 237 243 238 : ax-start-phy ( -- ) 244 select-phy245 ax-init-mii246 239 ax-auto-neg-wait 247 240 ; … … 298 291 ax-toggle-gpio 299 292 ax-get-phyid 293 select-phy 300 294 ax-stop-mac 301 295 ax-get-mac-address 2drop 302 296 ax-set-ipg 297 ax-init-mii 303 298 ; 304 299 … … 322 317 ['] ax-start-mac to start-mac 323 318 ['] ax-start-phy to start-phy 324 ['] ax-stop-phy to stop-phy325 319 ['] ax-stop-mac to stop-mac 326 320 ['] ax-get-mac-address to get-mac-address -
dev/usb2/device/net/common.fth
r2950 r3009 24 24 defer link-up? ( -- up? ) ' true to link-up? 25 25 defer start-phy ( -- ) ' noop to start-phy 26 defer stop-phy ( -- ) ' noop to stop-phy27 26 defer start-mac ( -- ) ' noop to start-mac 28 27 defer stop-mac ( -- ) ' noop to stop-mac -
dev/usb2/device/net/ethernet.fth
r2950 r3009 32 32 end-bulk-in 33 33 free-buf 34 stop-phy35 34 ; 36 35 … … 43 42 : copy-packet ( adr len -- len' ) 44 43 dup multi-packet? if 4 + then ( adr len len' ) 45 /outbuf > if ." USB Ethernet write packet too long" cr stop- netabort then ( adr len )44 /outbuf > if ." USB Ethernet write packet too long" cr stop-mac abort then ( adr len ) 46 45 47 46 multi-packet? if ( adr len ) … … 73 72 \ length.leword ~length.leword data [ pad-to-even ] 74 73 : extract-packet ( -- data-adr len ) 75 residue 4 < if ." Short residue from USB Ethernet" cr stop- netabort then74 residue 4 < if ." Short residue from USB Ethernet" cr stop-mac abort then 76 75 77 76 pkt-adr dup 4 + swap >r … … 132 131 then ( adr ihandle|0 ) 133 132 134 dup 0= if ." Can't open obp-tftp support package" stop- netabort then133 dup 0= if ." Can't open obp-tftp support package" stop-mac abort then 135 134 ( adr ihandle ) 136 135 … … 187 186 link-up? 0= if 188 187 ." Network not connected." cr 189 stop-phy190 188 true exit 191 189 then
Note: See TracChangeset
for help on using the changeset viewer.
