Fixed arduino hiding.

This commit is contained in:
Brad Nelson
2021-02-06 18:23:06 -08:00
parent 72ac2a39d3
commit 412da1d8b2
6 changed files with 36 additions and 7 deletions

View File

@ -113,7 +113,7 @@ unit_tests: $(POSIX)/ueforth common/all_tests.fs
$(GEN):
mkdir -p $@
POSIX_BOOT = common/boot.fs common/vocabulary.fs common/ansi.fs \
POSIX_BOOT = common/boot.fs common/vocabulary.fs common/hide_calls.fs common/ansi.fs \
posix/posix.fs posix/posix_highlevel.fs \
common/highlevel.fs common/filetools.fs posix/posix_desktop.fs \
common/tasks.fs common/streams.fs common/blocks.fs posix/args.fs \
@ -121,7 +121,7 @@ POSIX_BOOT = common/boot.fs common/vocabulary.fs common/ansi.fs \
$(GEN)/posix_boot.h: common/source_to_string.js $(POSIX_BOOT) | $(GEN)
echo "ok" | cat $(POSIX_BOOT) - | $< boot >$@
WINDOWS_BOOT = common/boot.fs common/vocabulary.fs common/ansi.fs \
WINDOWS_BOOT = common/boot.fs common/vocabulary.fs common/hide_calls.fs common/ansi.fs \
windows/windows.fs windows/windows_highlevel.fs common/highlevel.fs \
common/tasks.fs common/streams.fs common/blocks.fs \
common/utils.fs
@ -129,7 +129,7 @@ $(GEN)/windows_boot.h: common/source_to_string.js $(WINDOWS_BOOT) | $(GEN)
echo "ok" | cat $(WINDOWS_BOOT) - | $< boot >$@
ARDUINO_BOOT = common/boot.fs common/vocabulary.fs arduino/arduino.fs \
posix/posix_highlevel.fs common/highlevel.fs common/filetools.fs \
arduino/arduino_highlevel.fs common/highlevel.fs common/filetools.fs \
common/tasks.fs common/streams.fs arduino/arduino_server.fs \
arduino/esp_camera.fs common/blocks.fs common/utils.fs \
arduino/autoboot.fs

View File

@ -0,0 +1,5 @@
( Words with OS assist )
: allocate ( n -- a ior ) malloc dup 0= ;
: free ( a -- ior ) sysfree drop 0 ;
: resize ( a n -- a ior ) realloc dup 0= ;

View File

@ -1,4 +1,7 @@
( Server Terminal )
vocabulary web-interface web-interface definitions
: n. ( n -- ) <# #s #> type ; : ip# dup 255 and n. [char] . emit 256 / ;
: ip. ( n -- ) ip# ip# ip# 255 and . ;
@ -97,8 +100,17 @@ window.onload = function() {
variable webserver
20000 constant out-size
streams
: >stream >stream ;
: stream> stream> ;
: stream>ch stream>ch ;
: stream stream ;
web-interface
200 stream input-stream
out-size dup stream output-stream
create out-string out-size 1+ allot align
: handle-index
@ -132,6 +144,11 @@ create out-string out-size 1+ allot align
again
;
tasks
: task task ;
: start-task start-task ;
web-interface
' do-serve 1000 1000 task webserver-task
: serve
@ -144,4 +161,9 @@ create out-string out-size 1+ allot align
WIFI_MODE_STA Wifi.mode
WiFi.begin begin WiFi.localIP 0= while 100 ms repeat WiFi.localIP ip. cr
z" ueforth" MDNS.begin if ." MDNS started" else ." MDNS failed" then cr ;
forth definitions web-interface
: webui ( z z -- ) wifi serve ;
forth

View File

@ -133,7 +133,7 @@ static void ueforth_init(int argc, char *argv[], void *heap,
// FORTH vocabulary
*g_sys.heap++ = 0;
g_sys.current = (cell_t **) g_sys.heap;
g_sys.context = (cell_t **) g_sys.heap; ++g_sys.heap;
g_sys.context = (cell_t **) g_sys.heap; *g_sys.heap++ = 0;
*g_sys.heap++ = 0; *g_sys.heap++ = 0; *g_sys.heap++ = 0;
ueforth_run(0);

View File

@ -0,0 +1,5 @@
internals definitions
transfer call0 transfer call1 transfer call2 transfer call3 transfer call4
transfer call5 transfer call6 transfer call7 transfer call8 transfer call9
transfer call10
forth definitions

View File

@ -25,7 +25,4 @@ transfer $@
transfer see. transfer see-loop transfer >name-length transfer exit=
transfer see-one
transfer tib-setup transfer input-limit
transfer call0 transfer call1 transfer call2 transfer call3 transfer call4
transfer call5 transfer call6 transfer call7 transfer call8 transfer call9
transfer call10
forth definitions