Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions common/forth_namespace_tests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,9 @@ e: check-esp32-builtins
check-files-dir-reverse
out: dacWrite
out: MDNS.begin
out: MDNS.addService
out: MDNS.setInstanceName
out: MDNS.addServiceTxt
;e

e: check-esp32-bindings
Expand Down
6 changes: 5 additions & 1 deletion esp32/builtins.h
Original file line number Diff line number Diff line change
Expand Up @@ -425,5 +425,9 @@ static cell_t FromIP(IPAddress ip) {
# endif
# define OPTIONAL_MDNS_SUPPORT \
/* mDNS */ \
X("MDNS.begin", MDNS_BEGIN, n0 = MDNS.begin(c0))
X("MDNS.begin", MDNS_BEGIN, n0 = MDNS.begin(c0) ? -1 : 0) \
X("MDNS.addService", MDNS_ADD_SERVICE, n0 = MDNS.addService(c2, c1, n0) ? -1 : 0; NIPn(2)) \
X("MDNS.setInstanceName", MDNS_SET_INSTANCE_NAME, MDNS.setInstanceName(c0); DROP) \
X("MDNS.addServiceTxt", MDNS_ADD_SERVICE_TXT, MDNS.addServiceTxt(c3, c2, c1, c0); DROPn(4))
/* alx */
#endif
5 changes: 4 additions & 1 deletion site/ESP32forth.html
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,10 @@ <h5>WiFi</h5>

<h5>mDNS</h5>
<pre>
MDNS.begin ( name-z -- ) Start multicast dns
MDNS.begin ( hostname-z -- f ) Start multicast dns
MDNS.setInstanceName ( name-z -- ) Set the instance (friendly) name
MDNS.addService ( service-z protocol-z port-n -- f ) Advertise a service (such as "http") using a protocol ("tcp" or "udp") and a port number.
MDNS.addServiceTxt ( service-z protocol-z key-z value-z -- ) Add a service key/value pair
</pre>

<h5>SPIFFS</h5>
Expand Down