Hiding more words

This commit is contained in:
Brad Nelson
2021-02-06 18:39:22 -08:00
parent 412da1d8b2
commit 418dbef418
4 changed files with 27 additions and 1 deletions

View File

@ -128,7 +128,7 @@ WINDOWS_BOOT = common/boot.fs common/vocabulary.fs common/hide_calls.fs common/a
$(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 \
ARDUINO_BOOT = common/boot.fs common/vocabulary.fs arduino/arduino.fs arduino/hide_io.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 \

View File

@ -1,5 +1,7 @@
( Handling for ESP32-CAM )
vocabulary camera camera definitions
0 constant PIXFORMAT_RGB565
1 constant PIXFORMAT_YUV422
2 constant PIXFORMAT_GRAYSCALE
@ -28,3 +30,5 @@ create camera-config
1 , ( fb_count )
constant camera-fb-count
constant camera-format
forth definitions

View File

@ -0,0 +1,11 @@
( Migrate various words to separate vocabularies )
vocabulary Wire Wire definitions
transfer Wire.begin transfer Wire.setClock transfer Wire.getClock
transfer Wire.setTimeout transfer Wire.getTimeout
transfer Wire.lastError transfer Wire.getErrorText
transfer Wire.beginTransmission transfer Wire.endTransmission
transfer Wire.requestFrom transfer Wire.writeTransmission
transfer Wire.readTransmission transfer Wire.write
transfer Wire.available transfer Wire.read
transfer Wire.peek transfer Wire.busy transfer Wire.flush
forth definitions

View File

@ -112,6 +112,16 @@ SEE ( "name" -- ) Attempt to decompile a word
VARIABLE ECHO -- Determines if commands are echoed
</pre>
<h5>Vocabularies</h5>
<pre>
VOCABULARY ( "name" ) Create a vocabulary with the current vocabulary as parent
FORTH ( -- ) Make the FORTH vocabulary the context vocabulary
DEFINITIONS ( -- ) Make the context vocabulary the current vocabulary
VLIST ( -- ) List the words in the context vocabulary
TRANSFER ( "name" ) Move a word from its current dictionary to the current vocabulary
Useful for "hiding" built-in words
</pre>
<h5>Block Editor</h5>
<pre>
USE ( "name" -- ) Use "name" as the blockfile, e.g. USE /spiffs/foo
@ -280,6 +290,7 @@ WebServer.method ( ws -- n ) GET / POST etc.
</pre>
<h5>Wire</h5>
These words are inside the <code>Wire</code> vocabulary.
<pre>
Wire.begin ( -- f )
Wire.setPins ( sda scl -- f )