-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3054 from cesanta/move
move UART bridge -> tutorials
- Loading branch information
Showing
47 changed files
with
44 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../http/http-server/arduino/esp32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../mqtt/mqtt-client/arduino/esp32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../mqtt/mqtt-client/arduino/sim800 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../http/http-server/arduino/teensy41 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../http/http-server/arduino/w5500 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../mqtt/mqtt-client/arduino/w5500 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
tutorials/http/http-client/esp8266/http-client-server/src/main/mongoose.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
../../../../../mongoose.c | ||
../../../../../../../mongoose.c |
2 changes: 1 addition & 1 deletion
2
tutorials/http/http-client/esp8266/http-client-server/src/main/mongoose.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
../../../../../mongoose.h | ||
../../../../../../../mongoose.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
examples/esp32/uart-bridge/Makefile → tutorials/http/uart-bridge/esp32/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../../mongoose.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../../mongoose.h |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../net.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../packed_fs.c |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../mongoose.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../mongoose.h |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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$....&[email protected] | ||
|
@@ -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,22 +727,20 @@ 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} | ||
}; | ||
|
||
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++) { | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../http/uart-bridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../http/uart-bridge |