fix(arnitech): NET_SEND writes the chip's data port with plain stores
The copy loop wrote each byte with STA RRNET_RX_TX_DATA,X, and an indexed store reads its address first. Reads of RxTxData take the bytes of a received frame (AN181), so on a real CS8900A each byte sent took one of a frame the program had started reading. The loop now stores to the port's low or high byte by address, as ip65's and Contiki's drivers do; reads stay indexed, which read once.
This commit is contained in:
1 parent
0838c4e310
commit
05e4b67858
1 file changed
+6
-1
@@ -273,7 +273,12 @@ arnitech_net_copy:
|
||||
tax
|
||||
bvs @2
|
||||
lda (SAL), y
|
||||
sta RRNET_RX_TX_DATA, x
|
||||
cpx #$01 ; plain stores: an indexed one reads the port
|
||||
beq @7 ; first, which takes a byte of a received frame
|
||||
sta RRNET_RX_TX_DATA+0
|
||||
bvc @3 ; branch always
|
||||
@7:
|
||||
sta RRNET_RX_TX_DATA+1
|
||||
bvc @3 ; branch always
|
||||
@2:
|
||||
lda RRNET_RX_TX_DATA, x
|
||||
|
||||
Reference in new issue
Block a user