Skip to content

Commit

Permalink
reset fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nihirash committed Oct 31, 2022
1 parent e7af7e3 commit 6ba1bd5
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
1 change: 0 additions & 1 deletion dezog_run.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
device zxspectrum128
SLDOPT COMMENT WPMEM, LOGPOINT, ASSERTION
define V 20
define ESXCOMPAT 1
stack_top:
include "modules/version.asm"
include "modules/display.asm"
Expand Down
17 changes: 15 additions & 2 deletions drivers/zxuno.asm
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,25 @@ init:
ld bc, ZXUNO_REG : in A, (c)
ld bc, ZXUNO_ADDR : ld a, UART_DATA_REG : out (c), a
ld bc, ZXUNO_REG : in A, (c)
ld b, #ff

ei
ld b,50
1
push bc
call uartRead
pop bc
halt
djnz 1b

ld bc, #ffff
.loop
push bc
call uartRead
call c, Display.putLogC
pop bc
djnz .loop
dec bc
ld a,b : or c
jr z, .loop

ld hl, set_speed_cmd
.speedCmd
Expand Down
2 changes: 2 additions & 0 deletions mock/uart-log.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ OK

OK

OK

OK
WIFI DISCONNECT

Expand Down
3 changes: 3 additions & 0 deletions modules/wifi.asm
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ init:
EspCmdOkErr "ATE0"
EspCmdOkErr "AT+CWMODE_DEF=1"
jr c, .err
EspCmdOkErr "AT+CWAUTOCONN=1"
jr c, .err
EspCmdOkErr "AT+CWQAP"
jr c, .err
ret
Expand All @@ -47,6 +49,7 @@ init:
.err_msg db 13, "ESP error! Halted!", 0

reset:
EspCmdOkErr "AT"
EspCmd "AT+RST"
.loop
call Uart.read
Expand Down
2 changes: 1 addition & 1 deletion version.def
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20
21

0 comments on commit 6ba1bd5

Please sign in to comment.