minor timing changes
This commit is contained in:
parent
213f20ee7a
commit
ab60f86a32
|
@ -1080,7 +1080,17 @@ PUB lan_isconnected(handle): connected
|
||||||
connected := bus_getchar1
|
connected := bus_getchar1
|
||||||
|
|
||||||
PUB lan_rxcount
|
PUB lan_rxcount
|
||||||
PUB lan_resetbuffers
|
PUB lan_resetbuffers(handle)
|
||||||
|
''funktionsgruppe : lan
|
||||||
|
''funktion : Sende- und Empfangspuffer zurücksetzen
|
||||||
|
''eingabe : -
|
||||||
|
''ausgabe : -
|
||||||
|
''busprotokoll : [078][put.handle]
|
||||||
|
'' : handle - lfd. Nr. der Verbindung
|
||||||
|
|
||||||
|
bus_putchar1(gc#a_lanResetBuffers)
|
||||||
|
bus_putchar1(handle)
|
||||||
|
|
||||||
PUB lan_waitconntimeout(handle, timeout): connected
|
PUB lan_waitconntimeout(handle, timeout): connected
|
||||||
''funktionsgruppe : lan
|
''funktionsgruppe : lan
|
||||||
''funktion : bestimmte Zeit auf Verbindung warten
|
''funktion : bestimmte Zeit auf Verbindung warten
|
||||||
|
|
|
@ -1211,7 +1211,18 @@ PRI lan_isconnected | handle
|
||||||
bus_putchar(sock.isConnected(handle))
|
bus_putchar(sock.isConnected(handle))
|
||||||
|
|
||||||
PRI lan_rxcount
|
PRI lan_rxcount
|
||||||
PRI lan_resetbuffers
|
PRI lan_resetbuffers | handle
|
||||||
|
''funktionsgruppe : lan
|
||||||
|
''funktion : Sende- und Empfangspuffer zurücksetzen
|
||||||
|
''eingabe : -
|
||||||
|
''ausgabe : -
|
||||||
|
''busprotokoll : [078][get.handle]
|
||||||
|
'' : handle - lfd. Nr. der Verbindung
|
||||||
|
|
||||||
|
handle := bus_getchar
|
||||||
|
|
||||||
|
sock.resetBuffers(handle)
|
||||||
|
|
||||||
PRI lan_waitconntimeout | handle, timeout, t, connected
|
PRI lan_waitconntimeout | handle, timeout, t, connected
|
||||||
''funktionsgruppe : lan
|
''funktionsgruppe : lan
|
||||||
''funktion : bestimmte Zeit auf Verbindung warten
|
''funktion : bestimmte Zeit auf Verbindung warten
|
||||||
|
|
|
@ -65,13 +65,19 @@ PUB main
|
||||||
other: ios.print(@help)
|
other: ios.print(@help)
|
||||||
|
|
||||||
if (ip_addr) ' Adresse nicht 0.0.0.0
|
if (ip_addr) ' Adresse nicht 0.0.0.0
|
||||||
ios.lanstart
|
ios.print(string("Starte LAN..."))
|
||||||
handle_control := ios.lan_connect(ip_addr, 21)
|
|
||||||
ios.printnl
|
ios.printnl
|
||||||
|
ios.lanstart
|
||||||
|
delay_ms(5000) 'nach ios.lanstart dauert es, bis der Stack funktioniert
|
||||||
|
ios.print(string("Verbinde mit FTP-Server..."))
|
||||||
|
ios.printnl
|
||||||
|
handle_control := ios.lan_connect(ip_addr, 21)
|
||||||
|
ios.lan_resetbuffers(handle_control)
|
||||||
ios.print(string("Handle Connect: "))
|
ios.print(string("Handle Connect: "))
|
||||||
ios.print(num.ToStr(handle_control, num#DEC))
|
ios.print(num.ToStr(handle_control, num#DEC))
|
||||||
ios.printnl
|
ios.printnl
|
||||||
if (ios.lan_waitconntimeout(handle_control, 1500))
|
if (ios.lan_waitconntimeout(handle_control, 2000))
|
||||||
|
delay_ms(5000)
|
||||||
ios.print(string("Verbindung mit FTP-Server hergestellt."))
|
ios.print(string("Verbindung mit FTP-Server hergestellt."))
|
||||||
ios.printnl
|
ios.printnl
|
||||||
if getResponse(string("220 "))
|
if getResponse(string("220 "))
|
||||||
|
@ -93,6 +99,9 @@ PUB main
|
||||||
|
|
||||||
ios.stop
|
ios.stop
|
||||||
|
|
||||||
|
PRI delay_ms(Duration)
|
||||||
|
waitcnt(((clkfreq / 1_000 * Duration - 3932)) + cnt)
|
||||||
|
|
||||||
PRI setaddr (ipaddr) | pos, count 'IP-Adresse in Variable schreiben
|
PRI setaddr (ipaddr) | pos, count 'IP-Adresse in Variable schreiben
|
||||||
|
|
||||||
count := 3
|
count := 3
|
||||||
|
|
Loading…
Reference in New Issue