mirror of
https://github.com/cesanta/mongoose.git
synced 2025-08-06 05:26:15 +08:00
move UART bridge -> tutorials
This commit is contained in:
commit
aeda7e5520
13
.github/workflows/nightly.yml
vendored
13
.github/workflows/nightly.yml
vendored
@ -367,9 +367,9 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
example:
|
||||
- path: esp32/uart-bridge
|
||||
- path: esp32/micropython
|
||||
#- path: esp8266/http-client-server
|
||||
- path: micropython/esp32
|
||||
- path: http/uart-bridge/esp32
|
||||
- path: http/http-client/esp8266/http-client-server
|
||||
name: ${{ matrix.example.path }}
|
||||
env:
|
||||
GO: 0
|
||||
@ -377,7 +377,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with: { fetch-depth: 2 }
|
||||
- run: echo # nothing specific to install or do
|
||||
- run: make -C examples/${{ matrix.example.path }} build
|
||||
- run: make -C tutorials/${{ matrix.example.path }} build
|
||||
|
||||
generic_examples_arm:
|
||||
runs-on: ubuntu-latest
|
||||
@ -425,13 +425,14 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
example:
|
||||
- path: esp32/device-dashboard
|
||||
- path: esp32
|
||||
name: ${{ matrix.example.path }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with: { fetch-depth: 2 }
|
||||
- run: echo # nothing specific to install or do
|
||||
- run: make -C examples/${{ matrix.example.path }} build
|
||||
- run: make -C tutorials/http/device-dashboard/${{ matrix.example.path }} build
|
||||
|
||||
|
||||
device_dashboard_examples_arm:
|
||||
runs-on: ubuntu-latest
|
||||
|
14
.github/workflows/quicktest.yml
vendored
14
.github/workflows/quicktest.yml
vendored
@ -245,20 +245,20 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
example:
|
||||
- path: esp32/uart-bridge
|
||||
#- path: esp8266/http-client-server
|
||||
- path: http/uart-bridge/esp32
|
||||
- path: http/http-client/esp8266/http-client-server
|
||||
name: ${{ matrix.example.path }}
|
||||
env:
|
||||
GO: 0
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with: { fetch-depth: 2 }
|
||||
- run: if ./test/match_changed_files.sh '^src|^examples/${{ matrix.example.path }}'; then echo GO=1 >> $GITHUB_ENV ; fi
|
||||
- run: if ./test/match_changed_files.sh '^src|^tutorials/http/uart-bridge|^tutorials/${{ matrix.example.path }}'; then echo GO=1 >> $GITHUB_ENV ; fi
|
||||
- if: ${{ env.GO == 1 }}
|
||||
run: |
|
||||
# nothing specific to install or do
|
||||
- if: ${{ env.GO == 1 }}
|
||||
run: make -C examples/${{ matrix.example.path }} build
|
||||
run: make -C tutorials/${{ matrix.example.path }} build
|
||||
|
||||
generic_examples_arm:
|
||||
runs-on: ubuntu-latest
|
||||
@ -286,7 +286,7 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
example:
|
||||
- path: esp32/device-dashboard
|
||||
- path: esp32
|
||||
name: ${{ matrix.example.path }}
|
||||
env:
|
||||
GO: 0
|
||||
@ -294,12 +294,12 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with: { fetch-depth: 2 }
|
||||
- run: |
|
||||
if ./test/match_changed_files.sh '^src|examples/device-dashboard|^examples/${{ matrix.example.path }}'; then
|
||||
if ./test/match_changed_files.sh '^src|tutorials/http/device-dashboard'; then
|
||||
echo GO=1 >> $GITHUB_ENV
|
||||
# nothing specific to install or do
|
||||
fi
|
||||
- if: ${{ env.GO == 1 }}
|
||||
run: make -C examples/${{ matrix.example.path }} build
|
||||
run: make -C tutorials/http/device-dashboard/${{ matrix.example.path }} build
|
||||
|
||||
device_dashboard_examples_arm:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -1 +0,0 @@
|
||||
../../../../mongoose.c
|
@ -1 +0,0 @@
|
||||
../../../../mongoose.h
|
@ -1 +0,0 @@
|
||||
../../../device-dashboard/net.c
|
@ -1 +0,0 @@
|
||||
../../../device-dashboard/net.h
|
@ -1 +0,0 @@
|
||||
../../../device-dashboard/packed_fs.c
|
@ -1 +0,0 @@
|
||||
../../../../mongoose.c
|
@ -1 +0,0 @@
|
||||
../../../../mongoose.h
|
@ -1 +0,0 @@
|
||||
../../../uart-bridge/net.c
|
@ -1 +0,0 @@
|
||||
../../../uart-bridge/packed_fs.c
|
@ -1 +0,0 @@
|
||||
../../mongoose.c
|
@ -1 +0,0 @@
|
||||
../../mongoose.h
|
1
tutorials/arduino/esp32-http
Symbolic link
1
tutorials/arduino/esp32-http
Symbolic link
@ -0,0 +1 @@
|
||||
../http/http-server/arduino/esp32
|
1
tutorials/arduino/esp32-mqtt
Symbolic link
1
tutorials/arduino/esp32-mqtt
Symbolic link
@ -0,0 +1 @@
|
||||
../mqtt/mqtt-client/arduino/esp32
|
1
tutorials/arduino/sim800-mqtt
Symbolic link
1
tutorials/arduino/sim800-mqtt
Symbolic link
@ -0,0 +1 @@
|
||||
../mqtt/mqtt-client/arduino/sim800
|
1
tutorials/arduino/teensy41-http
Symbolic link
1
tutorials/arduino/teensy41-http
Symbolic link
@ -0,0 +1 @@
|
||||
../http/http-server/arduino/teensy41
|
1
tutorials/arduino/w5500-http
Symbolic link
1
tutorials/arduino/w5500-http
Symbolic link
@ -0,0 +1 @@
|
||||
../http/http-server/arduino/w5500
|
1
tutorials/arduino/w5500-mqtt
Symbolic link
1
tutorials/arduino/w5500-mqtt
Symbolic link
@ -0,0 +1 @@
|
||||
../mqtt/mqtt-client/arduino/w5500
|
@ -1,5 +1,5 @@
|
||||
THISDIR = $(realpath $(CURDIR))
|
||||
ROOTDIR = $(realpath $(CURDIR)/../../..)
|
||||
ROOTDIR = $(realpath $(CURDIR)/../../../..)
|
||||
DOCKER ?= docker run --rm $(DA) -v $(ROOTDIR):$(ROOTDIR) -w $(THISDIR) espressif/idf
|
||||
CMD ?= idf.py build
|
||||
PORT ?= /dev/ttyUSB0
|
1
tutorials/http/device-dashboard/esp32/main/mongoose.c
Symbolic link
1
tutorials/http/device-dashboard/esp32/main/mongoose.c
Symbolic link
@ -0,0 +1 @@
|
||||
../../../../../mongoose.c
|
1
tutorials/http/device-dashboard/esp32/main/mongoose.h
Symbolic link
1
tutorials/http/device-dashboard/esp32/main/mongoose.h
Symbolic link
@ -0,0 +1 @@
|
||||
../../../../../mongoose.h
|
1
tutorials/http/device-dashboard/esp32/main/net.c
Symbolic link
1
tutorials/http/device-dashboard/esp32/main/net.c
Symbolic link
@ -0,0 +1 @@
|
||||
../../net.c
|
1
tutorials/http/device-dashboard/esp32/main/net.h
Symbolic link
1
tutorials/http/device-dashboard/esp32/main/net.h
Symbolic link
@ -0,0 +1 @@
|
||||
../../net.h
|
1
tutorials/http/device-dashboard/esp32/main/packed_fs.c
Symbolic link
1
tutorials/http/device-dashboard/esp32/main/packed_fs.c
Symbolic link
@ -0,0 +1 @@
|
||||
../../packed_fs.c
|
@ -1,5 +1,5 @@
|
||||
THISDIR = $(realpath $(CURDIR))
|
||||
ROOTDIR = $(realpath $(CURDIR)/../../..)
|
||||
ROOTDIR = $(realpath $(CURDIR)/../../../../..)
|
||||
DOCKER ?= docker run --rm $(DA) -v $(ROOTDIR):$(ROOTDIR) -w $(THISDIR) docker.io/mdashnet/8266
|
||||
CMD ?= make -C src defconfig app
|
||||
PORT ?= /dev/ttyUSB0
|
||||
|
@ -1 +1 @@
|
||||
../../../../../mongoose.c
|
||||
../../../../../../../mongoose.c
|
@ -1 +1 @@
|
||||
../../../../../mongoose.h
|
||||
../../../../../../../mongoose.h
|
@ -23,7 +23,7 @@ ifneq ($(OS),Windows_NT)
|
||||
packed_fs.c: $(shell find web_root -type f) Makefile
|
||||
rm -rf tmp/web_root && mkdir tmp && cp -r web_root tmp/
|
||||
find tmp -type f | xargs -n1 gzip
|
||||
$(CC) ../../test/pack.c -o pack
|
||||
$(CC) ../../../test/pack.c -o pack
|
||||
cd tmp && ../pack `find web_root -type f` > ../$@
|
||||
endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
CWD = $(realpath $(CURDIR))
|
||||
MNT = $(realpath $(CURDIR)/../../..)
|
||||
MNT = $(realpath $(CURDIR)/../../../..)
|
||||
PORT ?= /dev/ttyUSB0
|
||||
CMD ?= build
|
||||
|
1
tutorials/http/uart-bridge/esp32/main/mongoose.c
Symbolic link
1
tutorials/http/uart-bridge/esp32/main/mongoose.c
Symbolic link
@ -0,0 +1 @@
|
||||
../../../../../mongoose.c
|
1
tutorials/http/uart-bridge/esp32/main/mongoose.h
Symbolic link
1
tutorials/http/uart-bridge/esp32/main/mongoose.h
Symbolic link
@ -0,0 +1 @@
|
||||
../../../../../mongoose.h
|
1
tutorials/http/uart-bridge/esp32/main/net.c
Symbolic link
1
tutorials/http/uart-bridge/esp32/main/net.c
Symbolic link
@ -0,0 +1 @@
|
||||
../../net.c
|
1
tutorials/http/uart-bridge/esp32/main/packed_fs.c
Symbolic link
1
tutorials/http/uart-bridge/esp32/main/packed_fs.c
Symbolic link
@ -0,0 +1 @@
|
||||
../../packed_fs.c
|
1
tutorials/http/uart-bridge/mongoose.c
Symbolic link
1
tutorials/http/uart-bridge/mongoose.c
Symbolic link
@ -0,0 +1 @@
|
||||
../../../mongoose.c
|
1
tutorials/http/uart-bridge/mongoose.h
Symbolic link
1
tutorials/http/uart-bridge/mongoose.h
Symbolic link
@ -0,0 +1 @@
|
||||
../../../mongoose.h
|
@ -2,8 +2,17 @@
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
const char *mg_unlist(size_t no);
|
||||
const char *mg_unpack(const char *, size_t *, time_t *);
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
static const unsigned char v1[] = {
|
||||
31, 139, 8, 8, 29, 105, 247, 99, 0, 3, 105, 110, // .....i.c..in
|
||||
31, 139, 8, 8, 6, 78, 191, 103, 0, 3, 105, 110, // .....N.g..in
|
||||
100, 101, 120, 46, 104, 116, 109, 108, 0, 93, 144, 177, // dex.html.]..
|
||||
78, 196, 48, 12, 134, 247, 123, 138, 144, 153, 180, 176, // N.0...{.....
|
||||
49, 36, 149, 208, 245, 6, 38, 24, 64, 130, 49, 77, // 1$....&.@.1M
|
||||
@ -28,7 +37,7 @@ static const unsigned char v1[] = {
|
||||
130, 117, 1, 0, 0, 0 // .u...
|
||||
};
|
||||
static const unsigned char v2[] = {
|
||||
31, 139, 8, 8, 29, 105, 247, 99, 0, 3, 109, 97, // .....i.c..ma
|
||||
31, 139, 8, 8, 6, 78, 191, 103, 0, 3, 109, 97, // .....N.g..ma
|
||||
105, 110, 46, 106, 115, 0, 181, 88, 109, 111, 219, 70, // in.js..Xmo.F
|
||||
18, 254, 174, 95, 49, 80, 125, 37, 121, 165, 72, 43, // ..._1P}%y.H+
|
||||
113, 225, 131, 44, 235, 144, 6, 45, 112, 135, 38, 233, // q..,...-p.&.
|
||||
@ -195,7 +204,7 @@ static const unsigned char v2[] = {
|
||||
154, 248, 11, 218, 252, 214, 171, 12, 23, 0, 0, 0 // ...........
|
||||
};
|
||||
static const unsigned char v3[] = {
|
||||
31, 139, 8, 8, 29, 105, 247, 99, 0, 3, 112, 114, // .....i.c..pr
|
||||
31, 139, 8, 8, 6, 78, 191, 103, 0, 3, 112, 114, // .....N.g..pr
|
||||
101, 97, 99, 116, 46, 109, 105, 110, 46, 106, 115, 0, // eact.min.js.
|
||||
157, 91, 123, 119, 219, 182, 146, 255, 127, 63, 69, 164, // .[{w.....?E.
|
||||
211, 163, 18, 43, 68, 177, 147, 182, 187, 75, 5, 213, // ...+D....K..
|
||||
@ -641,7 +650,7 @@ static const unsigned char v3[] = {
|
||||
138, 51, 0, 0, 0 // .3..
|
||||
};
|
||||
static const unsigned char v4[] = {
|
||||
31, 139, 8, 8, 29, 105, 247, 99, 0, 3, 115, 116, // .....i.c..st
|
||||
31, 139, 8, 8, 6, 78, 191, 103, 0, 3, 115, 116, // .....N.g..st
|
||||
121, 108, 101, 46, 99, 115, 115, 0, 149, 85, 193, 142, // yle.css..U..
|
||||
155, 48, 16, 189, 231, 43, 92, 173, 42, 181, 171, 192, // .0...+..*...
|
||||
134, 16, 96, 33, 151, 222, 250, 17, 85, 15, 6, 155, // ..`!....U...
|
||||
@ -718,10 +727,10 @@ static const struct packed_file {
|
||||
size_t size;
|
||||
time_t mtime;
|
||||
} packed_files[] = {
|
||||
{"/web_root/index.html.gz", v1, sizeof(v1), 1677158685},
|
||||
{"/web_root/main.js.gz", v2, sizeof(v2), 1677158685},
|
||||
{"/web_root/preact.min.js.gz", v3, sizeof(v3), 1677158685},
|
||||
{"/web_root/style.css.gz", v4, sizeof(v4), 1677158685},
|
||||
{"/web_root/index.html.gz", v1, sizeof(v1), 1740590598},
|
||||
{"/web_root/main.js.gz", v2, sizeof(v2), 1740590598},
|
||||
{"/web_root/preact.min.js.gz", v3, sizeof(v3), 1740590598},
|
||||
{"/web_root/style.css.gz", v4, sizeof(v4), 1740590598},
|
||||
{NULL, NULL, 0, 0}
|
||||
};
|
||||
|
||||
@ -729,11 +738,9 @@ static int scmp(const char *a, const char *b) {
|
||||
while (*a && (*a == *b)) a++, b++;
|
||||
return *(const unsigned char *) a - *(const unsigned char *) b;
|
||||
}
|
||||
const char *mg_unlist(size_t no);
|
||||
const char *mg_unlist(size_t no) {
|
||||
return packed_files[no].name;
|
||||
}
|
||||
const char *mg_unpack(const char *path, size_t *size, time_t *mtime);
|
||||
const char *mg_unpack(const char *name, size_t *size, time_t *mtime) {
|
||||
const struct packed_file *p;
|
||||
for (p = packed_files; p->name != NULL; p++) {
|
1
tutorials/tcp/uart-bridge
Symbolic link
1
tutorials/tcp/uart-bridge
Symbolic link
@ -0,0 +1 @@
|
||||
../http/uart-bridge
|
1
tutorials/websocket/uart-bridge
Symbolic link
1
tutorials/websocket/uart-bridge
Symbolic link
@ -0,0 +1 @@
|
||||
../http/uart-bridge
|
Loading…
Reference in New Issue
Block a user