mirror of
https://github.com/bobbimanners/emailler.git
synced 2024-09-07 14:54:28 +00:00
Check for W5100 first.
Check first for a W5100 as checking for the CS8900A / LAN91C96 on similiar ports accidentally screws up a potential W5100 shared access (https://github.com/a2retrosystems/mxp/wiki/W5100-Shared-Access).
This commit is contained in:
parent
c05e55b0e5
commit
12909ff163
@ -2,9 +2,9 @@
|
||||
|
||||
.export a2_set_slot
|
||||
|
||||
.import _w5100_driver_io_base
|
||||
.import _cs8900a_driver_io_base
|
||||
.import _lan91c96_driver_io_base
|
||||
.import _w5100_driver_io_base
|
||||
|
||||
|
||||
.code
|
||||
@ -21,6 +21,11 @@ a2_set_slot:
|
||||
asl
|
||||
sta tmp1
|
||||
|
||||
lda _w5100_driver_io_base
|
||||
and #%10001111
|
||||
ora tmp1
|
||||
sta _w5100_driver_io_base
|
||||
|
||||
lda _cs8900a_driver_io_base
|
||||
and #%10001111
|
||||
ora tmp1
|
||||
@ -30,11 +35,6 @@ a2_set_slot:
|
||||
and #%10001111
|
||||
ora tmp1
|
||||
sta _lan91c96_driver_io_base
|
||||
|
||||
lda _w5100_driver_io_base
|
||||
and #%10001111
|
||||
ora tmp1
|
||||
sta _w5100_driver_io_base
|
||||
rts
|
||||
|
||||
|
||||
|
@ -14,6 +14,10 @@
|
||||
.import eth_outp
|
||||
.import eth_outp_len
|
||||
|
||||
.import _w5100
|
||||
.import _w5100_driver_name
|
||||
.import _w5100_driver_io_base
|
||||
|
||||
.import _cs8900a
|
||||
.import _cs8900a_driver_name
|
||||
.import _cs8900a_driver_io_base
|
||||
@ -22,10 +26,6 @@
|
||||
.import _lan91c96_driver_name
|
||||
.import _lan91c96_driver_io_base
|
||||
|
||||
.import _w5100
|
||||
.import _w5100_driver_name
|
||||
.import _w5100_driver_io_base
|
||||
|
||||
.import cfg_mac
|
||||
|
||||
.struct driver
|
||||
@ -134,6 +134,14 @@ set_name:
|
||||
; inputs: none
|
||||
; outputs: carry flag is set if there was an error, clear otherwise
|
||||
eth_init:
|
||||
ldax #_w5100
|
||||
jsr patch_wrapper
|
||||
ldax #_w5100_driver_name
|
||||
jsr set_name
|
||||
ldax _w5100_driver_io_base
|
||||
jsr init_adaptor
|
||||
bcc @done
|
||||
|
||||
ldax #_cs8900a
|
||||
jsr patch_wrapper
|
||||
ldax #_cs8900a_driver_name
|
||||
@ -148,14 +156,6 @@ eth_init:
|
||||
jsr set_name
|
||||
ldax _lan91c96_driver_io_base
|
||||
jsr init_adaptor
|
||||
bcc @done
|
||||
|
||||
ldax #_w5100
|
||||
jsr patch_wrapper
|
||||
ldax #_w5100_driver_name
|
||||
jsr set_name
|
||||
ldax _w5100_driver_io_base
|
||||
jsr init_adaptor
|
||||
@done:
|
||||
rts
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user