Compare commits
5
Commits
74ae6c40d4
...
851a4d7ff9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
851a4d7ff9
|
||
|
|
823e758987
|
||
|
|
c9a67ea925
|
||
|
|
83f467d5c8
|
||
|
|
6b0e40a926
|
Generated
+82
-72
@@ -86,7 +86,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "211713d2e9fb4793ce4360a712c0764264aff6be48932ccf02ca2a331c0436a9"
|
checksum = "211713d2e9fb4793ce4360a712c0764264aff6be48932ccf02ca2a331c0436a9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"btuuid",
|
"btuuid",
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
"embassy-sync 0.8.0",
|
"embassy-sync 0.8.0",
|
||||||
"embedded-io 0.7.1",
|
"embedded-io 0.7.1",
|
||||||
"embedded-io-async 0.7.0",
|
"embedded-io-async 0.7.0",
|
||||||
@@ -185,7 +185,7 @@ name = "cover-theif"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"critical-section",
|
"critical-section",
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
"embassy-executor",
|
"embassy-executor",
|
||||||
"embassy-net",
|
"embassy-net",
|
||||||
"embassy-time",
|
"embassy-time",
|
||||||
@@ -197,6 +197,10 @@ dependencies = [
|
|||||||
"esp-radio",
|
"esp-radio",
|
||||||
"esp-rtos",
|
"esp-rtos",
|
||||||
"picoserve",
|
"picoserve",
|
||||||
|
"portable-atomic",
|
||||||
|
"sntpc",
|
||||||
|
"sntpc-net-embassy",
|
||||||
|
"sntpc-time-embassy",
|
||||||
"static_cell",
|
"static_cell",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -334,14 +338,14 @@ version = "0.3.100"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f0963443817029b2024136fc4dd07a5107eb8f977eaf18fcd1fdeb11306b64ad"
|
checksum = "f0963443817029b2024136fc4dd07a5107eb8f977eaf18fcd1fdeb11306b64ad"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "defmt"
|
name = "defmt"
|
||||||
version = "1.1.0"
|
version = "1.1.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a6e524506490a1953d237cb87b1cfc1e46f88c18f10a22dfe0f507dc6bfc7f7f"
|
checksum = "e2953bfe4f93bbd20cc71198842756f77d161884c99ebbabc41d80231ded88d1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 1.3.2",
|
"bitflags 1.3.2",
|
||||||
"defmt-macros",
|
"defmt-macros",
|
||||||
@@ -349,12 +353,11 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "defmt-macros"
|
name = "defmt-macros"
|
||||||
version = "1.1.0"
|
version = "1.1.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f0a27770e9c8f719a79d8b638281f4d828f77d8fd61e0bd94451b9b85e576a0b"
|
checksum = "bad9c72e7ca2137e0dc3813245a0d282fd6daad32fd800af018306a9169b5fe8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"defmt-parser",
|
"defmt-parser",
|
||||||
"proc-macro-error2",
|
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.117",
|
"syn 2.0.117",
|
||||||
@@ -444,7 +447,7 @@ checksum = "5d0d3b15c9d7dc4fec1d8cb77112472fb008b3b28c51ad23838d83587a6d2f1e"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"cordyceps",
|
"cordyceps",
|
||||||
"critical-section",
|
"critical-section",
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
"document-features",
|
"document-features",
|
||||||
"embassy-executor-macros",
|
"embassy-executor-macros",
|
||||||
"embassy-executor-timer-queue",
|
"embassy-executor-timer-queue",
|
||||||
@@ -474,7 +477,7 @@ version = "0.1.2"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "dc2d050bdc5c21e0862a89256ed8029ae6c290a93aecefc73084b3002cdebb01"
|
checksum = "dc2d050bdc5c21e0862a89256ed8029ae6c290a93aecefc73084b3002cdebb01"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -492,7 +495,7 @@ version = "0.9.1"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "347bc855bdbdf50ed9c5a1d80e8204badb0ba149b8732dde38e1e9708ed9d313"
|
checksum = "347bc855bdbdf50ed9c5a1d80e8204badb0ba149b8732dde38e1e9708ed9d313"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
"document-features",
|
"document-features",
|
||||||
"embassy-net-driver",
|
"embassy-net-driver",
|
||||||
"embassy-sync 0.8.0",
|
"embassy-sync 0.8.0",
|
||||||
@@ -549,7 +552,7 @@ checksum = "7bbd85cf5a5ae56bdf26f618364af642d1d0a4e245cdd75cd9aabda382f65a81"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"critical-section",
|
"critical-section",
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
"embedded-io-async 0.7.0",
|
"embedded-io-async 0.7.0",
|
||||||
"futures-core",
|
"futures-core",
|
||||||
"futures-sink",
|
"futures-sink",
|
||||||
@@ -564,7 +567,7 @@ checksum = "592b0c143ec626e821d4d90da51a2bd91d559d6c442b7c74a47d368c9e23d97a"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"critical-section",
|
"critical-section",
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
"document-features",
|
"document-features",
|
||||||
"embassy-time-driver",
|
"embassy-time-driver",
|
||||||
"embedded-hal 0.2.7",
|
"embedded-hal 0.2.7",
|
||||||
@@ -641,7 +644,7 @@ version = "0.7.1"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9eb1aa714776b75c7e67e1da744b81a129b3ff919c8712b5e1b32252c1f07cc7"
|
checksum = "9eb1aa714776b75c7e67e1da744b81a129b3ff919c8712b5e1b32252c1f07cc7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -660,7 +663,7 @@ version = "0.7.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2564b9f813c544241430e147d8bc454815ef9ac998878d30cc3055449f7fd4c0"
|
checksum = "2564b9f813c544241430e147d8bc454815ef9ac998878d30cc3055449f7fd4c0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
"embedded-io 0.7.1",
|
"embedded-io 0.7.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -704,7 +707,7 @@ version = "1.1.13"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "839c4174b41e75c8f7306110b2c51996a293b8d1d850edd529011841d9fede7d"
|
checksum = "839c4174b41e75c8f7306110b2c51996a293b8d1d850edd529011841d9fede7d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
"enumset_derive",
|
"enumset_derive",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -734,7 +737,7 @@ checksum = "46ced060d4085858283df950b80a4da2348e1707d7d07b1e966308582dae79f5"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"allocator-api2",
|
"allocator-api2",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
"document-features",
|
"document-features",
|
||||||
"enumset",
|
"enumset",
|
||||||
"esp-config",
|
"esp-config",
|
||||||
@@ -750,7 +753,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "37950e24b2dfd98f1581102d1798281d4d9547af881e6bffc2c2b534c026ec8f"
|
checksum = "37950e24b2dfd98f1581102d1798281d4d9547af881e6bffc2c2b534c026ec8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
"document-features",
|
"document-features",
|
||||||
"esp-config",
|
"esp-config",
|
||||||
"esp-metadata-generated",
|
"esp-metadata-generated",
|
||||||
@@ -767,7 +770,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "35ffc117c3a9859835d89d0e90f5ee9886ce2264a71a849a7a22ab5308f6653c"
|
checksum = "35ffc117c3a9859835d89d0e90f5ee9886ce2264a71a849a7a22ab5308f6653c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
"document-features",
|
"document-features",
|
||||||
"embedded-storage",
|
"embedded-storage",
|
||||||
"esp-config",
|
"esp-config",
|
||||||
@@ -802,7 +805,7 @@ dependencies = [
|
|||||||
"bytemuck",
|
"bytemuck",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"critical-section",
|
"critical-section",
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
"delegate",
|
"delegate",
|
||||||
"digest",
|
"digest",
|
||||||
"document-features",
|
"document-features",
|
||||||
@@ -875,7 +878,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "e7c0a29815cd105ae1a02f3d0c6e7aafda9504a41effae17fac4c3f827719228"
|
checksum = "e7c0a29815cd105ae1a02f3d0c6e7aafda9504a41effae17fac4c3f827719228"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
"document-features",
|
"document-features",
|
||||||
"embassy-sync 0.8.0",
|
"embassy-sync 0.8.0",
|
||||||
"esp-config",
|
"esp-config",
|
||||||
@@ -892,7 +895,7 @@ version = "0.17.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "42dee1e9ac7c3539bf6464db1707b0edd7557168f98278cf3c84fe70e63c6ce6"
|
checksum = "42dee1e9ac7c3539bf6464db1707b0edd7557168f98278cf3c84fe70e63c6ce6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
"document-features",
|
"document-features",
|
||||||
"esp-metadata-generated",
|
"esp-metadata-generated",
|
||||||
"esp-sync",
|
"esp-sync",
|
||||||
@@ -909,7 +912,7 @@ dependencies = [
|
|||||||
"allocator-api2",
|
"allocator-api2",
|
||||||
"bt-hci",
|
"bt-hci",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
"docsplay",
|
"docsplay",
|
||||||
"document-features",
|
"document-features",
|
||||||
"embassy-net-driver",
|
"embassy-net-driver",
|
||||||
@@ -961,7 +964,7 @@ version = "0.14.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "66a814ae91452de56a5e74f69aebfee40579511756837d3774a56fd24cf0ab79"
|
checksum = "66a814ae91452de56a5e74f69aebfee40579511756837d3774a56fd24cf0ab79"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
"document-features",
|
"document-features",
|
||||||
"riscv",
|
"riscv",
|
||||||
"riscv-rt",
|
"riscv-rt",
|
||||||
@@ -987,7 +990,7 @@ checksum = "551f90766e1527edaa0c91e8d559e9e2a60397b545e93357ac61fb31845e5712"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"allocator-api2",
|
"allocator-api2",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
"document-features",
|
"document-features",
|
||||||
"embassy-executor",
|
"embassy-executor",
|
||||||
"embassy-sync 0.8.0",
|
"embassy-sync 0.8.0",
|
||||||
@@ -1013,7 +1016,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "b4736bfbbb9e3f6353344e14fc61b6d18d3b877c3286914cf8c0a037be0ed224"
|
checksum = "b4736bfbbb9e3f6353344e14fc61b6d18d3b877c3286914cf8c0a037be0ed224"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
"document-features",
|
"document-features",
|
||||||
"embassy-sync 0.6.2",
|
"embassy-sync 0.6.2",
|
||||||
"embassy-sync 0.7.2",
|
"embassy-sync 0.7.2",
|
||||||
@@ -1029,7 +1032,7 @@ version = "0.2.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2556f38f5292d9735d4e156e276815fc001c9a0a2be0544a575c5fb867129d24"
|
checksum = "2556f38f5292d9735d4e156e276815fc001c9a0a2be0544a575c5fb867129d24"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1038,7 +1041,7 @@ version = "0.2.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a4b3eb3435dae84de611d4384639e61eed862818223e93fa70c525cb6a70127f"
|
checksum = "a4b3eb3435dae84de611d4384639e61eed862818223e93fa70c525cb6a70127f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1047,7 +1050,7 @@ version = "0.2.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b290846b53db9a3965866964260220b67f2c41cc2dbc0b377e7136239fe168a7"
|
checksum = "b290846b53db9a3965866964260220b67f2c41cc2dbc0b377e7136239fe168a7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1056,7 +1059,7 @@ version = "0.2.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "57649401fc2f906a16e2268de88693724a125adcd0eba89b594a157affcee2d5"
|
checksum = "57649401fc2f906a16e2268de88693724a125adcd0eba89b594a157affcee2d5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1065,7 +1068,7 @@ version = "0.2.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5cf1be2e311f4b4e75b5507c6b007ffc3fcb8c6cb57f83cc6a9569ecdcf58484"
|
checksum = "5cf1be2e311f4b4e75b5507c6b007ffc3fcb8c6cb57f83cc6a9569ecdcf58484"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1074,7 +1077,7 @@ version = "0.2.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c2a9a7f1bc51e7026c3012cda4f11d8799e5e0c0bb3be85797462219def6c26e"
|
checksum = "c2a9a7f1bc51e7026c3012cda4f11d8799e5e0c0bb3be85797462219def6c26e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1083,7 +1086,7 @@ version = "0.2.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5d8321f44b57d8112cbd8607cc83b85783b9195289acb45532728e3e229e7786"
|
checksum = "5d8321f44b57d8112cbd8607cc83b85783b9195289acb45532728e3e229e7786"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1092,7 +1095,7 @@ version = "0.40.2"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5726e07689249d1a2cb7c492077bc424837fb68a64f7eb5d46569325352e9428"
|
checksum = "5726e07689249d1a2cb7c492077bc424837fb68a64f7eb5d46569325352e9428"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
"vcell",
|
"vcell",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -1102,7 +1105,7 @@ version = "0.29.2"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5ef0b623533bbaa37e348c18b6b41cfd5b47c3cb64a4b9e44f0295941d62aa2e"
|
checksum = "5ef0b623533bbaa37e348c18b6b41cfd5b47c3cb64a4b9e44f0295941d62aa2e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
"vcell",
|
"vcell",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -1112,7 +1115,7 @@ version = "0.32.2"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "21e89ed62cf6c043a6d29c520b02a13b359ec8a75d67b65d4330ed717d15fe97"
|
checksum = "21e89ed62cf6c043a6d29c520b02a13b359ec8a75d67b65d4330ed717d15fe97"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
"vcell",
|
"vcell",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -1122,7 +1125,7 @@ version = "0.2.2"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a6f8ba56195df10224263c60ceb93b4578450019ee838b7338039a281117cb02"
|
checksum = "a6f8ba56195df10224263c60ceb93b4578450019ee838b7338039a281117cb02"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
"vcell",
|
"vcell",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -1132,7 +1135,7 @@ version = "0.23.2"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c58f34ff2633968c12125efc7f4f8f101078d5d34c7cb60eab82268db20986f9"
|
checksum = "c58f34ff2633968c12125efc7f4f8f101078d5d34c7cb60eab82268db20986f9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
"vcell",
|
"vcell",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -1142,7 +1145,7 @@ version = "0.3.2"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2a926616351b1edfdb50b7ea6451a8dff0c7515c6ceb687063af7d32b117ec0d"
|
checksum = "2a926616351b1edfdb50b7ea6451a8dff0c7515c6ceb687063af7d32b117ec0d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
"vcell",
|
"vcell",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -1152,7 +1155,7 @@ version = "0.19.2"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c5bab026020ed4606ce113b6fde598dbc48f7eefcc46e9469ece77cc2b1aa4be"
|
checksum = "c5bab026020ed4606ce113b6fde598dbc48f7eefcc46e9469ece77cc2b1aa4be"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
"vcell",
|
"vcell",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -1162,7 +1165,7 @@ version = "0.31.2"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d0ad6f21cdf6ec7b06b7f7e0fbe51f0d975fd6a5fa67c3f8a5a910d3981af531"
|
checksum = "d0ad6f21cdf6ec7b06b7f7e0fbe51f0d975fd6a5fa67c3f8a5a910d3981af531"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
"vcell",
|
"vcell",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -1172,7 +1175,7 @@ version = "0.35.2"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8b4b8c4e4d9f187553ecdb7173edec7b2deb2beea106eedefecdb1654b8ee25a"
|
checksum = "8b4b8c4e4d9f187553ecdb7173edec7b2deb2beea106eedefecdb1654b8ee25a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
"vcell",
|
"vcell",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -1321,7 +1324,7 @@ version = "0.9.3"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "25ba4bd83f9415b58b4ed8dc5714c76e626a105be4646c02630ad730ad3b5aa4"
|
checksum = "25ba4bd83f9415b58b4ed8dc5714c76e626a105be4646c02630ad730ad3b5aa4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
"hash32 0.3.1",
|
"hash32 0.3.1",
|
||||||
"stable_deref_trait",
|
"stable_deref_trait",
|
||||||
]
|
]
|
||||||
@@ -1554,12 +1557,12 @@ checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "picoserve"
|
name = "picoserve"
|
||||||
version = "0.18.0"
|
version = "0.19.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3e4976908c758efc04289ad266181f22e252b67daac2710581da9f5aa7a3207a"
|
checksum = "4aaf10aff74fc2b847b186ae037e91412f5b17a5224ba162a2c1bb41f3f48f86"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"const-sha1",
|
"const-sha1",
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
"embassy-net",
|
"embassy-net",
|
||||||
"embassy-time",
|
"embassy-time",
|
||||||
"embedded-io-async 0.7.0",
|
"embedded-io-async 0.7.0",
|
||||||
@@ -1611,9 +1614,9 @@ checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "portable-atomic"
|
name = "portable-atomic"
|
||||||
version = "1.13.1"
|
version = "1.15.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
|
checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "portable-atomic-util"
|
name = "portable-atomic-util"
|
||||||
@@ -1654,28 +1657,6 @@ dependencies = [
|
|||||||
"toml_edit",
|
"toml_edit",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "proc-macro-error-attr2"
|
|
||||||
version = "2.0.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro2",
|
|
||||||
"quote",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "proc-macro-error2"
|
|
||||||
version = "2.0.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro-error-attr2",
|
|
||||||
"proc-macro2",
|
|
||||||
"quote",
|
|
||||||
"syn 2.0.117",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "proc-macro2"
|
name = "proc-macro2"
|
||||||
version = "1.0.106"
|
version = "1.0.106"
|
||||||
@@ -1765,7 +1746,7 @@ version = "0.16.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3d07b9f3a0eff773fc4df11f44ada4fa302e529bff4b7fe7e6a4b98a65ce9174"
|
checksum = "3d07b9f3a0eff773fc4df11f44ada4fa302e529bff4b7fe7e6a4b98a65ce9174"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
"riscv",
|
"riscv",
|
||||||
"riscv-pac",
|
"riscv-pac",
|
||||||
"riscv-rt-macros",
|
"riscv-rt-macros",
|
||||||
@@ -1916,6 +1897,35 @@ dependencies = [
|
|||||||
"managed",
|
"managed",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "sntpc"
|
||||||
|
version = "0.11.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "294278b134cd7d06d7f22eca970aebe38707864c080f66547f9ad26327534af3"
|
||||||
|
dependencies = [
|
||||||
|
"cfg-if",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "sntpc-net-embassy"
|
||||||
|
version = "0.11.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "97d4addcbed51e6aa5178ba85834d1748b70da0f3df4552382a10afbfe285ae3"
|
||||||
|
dependencies = [
|
||||||
|
"embassy-net",
|
||||||
|
"sntpc",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "sntpc-time-embassy"
|
||||||
|
version = "0.6.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "184c354de440d7b2e95a547eb16f2527a1eba1bb666f322782cdb4d4668fc66f"
|
||||||
|
dependencies = [
|
||||||
|
"embassy-time",
|
||||||
|
"sntpc",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "somni-expr"
|
name = "somni-expr"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
@@ -2254,7 +2264,7 @@ version = "0.22.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "409a9b4629d429e995cde4dfbd9fe562ccae66f7624514e200733fc5d0ea8905"
|
checksum = "409a9b4629d429e995cde4dfbd9fe562ccae66f7624514e200733fc5d0ea8905"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"defmt 1.1.0",
|
"defmt 1.1.1",
|
||||||
"document-features",
|
"document-features",
|
||||||
"xtensa-lx",
|
"xtensa-lx",
|
||||||
"xtensa-lx-rt-proc-macros",
|
"xtensa-lx-rt-proc-macros",
|
||||||
|
|||||||
+8
-3
@@ -18,7 +18,7 @@ esp-rtos = { version = "0.3.0", features = [
|
|||||||
"esp32c6",
|
"esp32c6",
|
||||||
] }
|
] }
|
||||||
|
|
||||||
defmt = "1.1.0"
|
defmt = "1.1.1"
|
||||||
esp-bootloader-esp-idf = { version = "0.5.0", features = ["defmt", "esp32c6"] }
|
esp-bootloader-esp-idf = { version = "0.5.0", features = ["defmt", "esp32c6"] }
|
||||||
|
|
||||||
embassy-executor = { version = "0.10.0", features = ["defmt"] }
|
embassy-executor = { version = "0.10.0", features = ["defmt"] }
|
||||||
@@ -34,7 +34,7 @@ esp-println = { version = "0.17.0", features = ["defmt-espflash", "esp32c6"] }
|
|||||||
critical-section = "1.2.0"
|
critical-section = "1.2.0"
|
||||||
static_cell = "2.1.1"
|
static_cell = "2.1.1"
|
||||||
|
|
||||||
embassy-net = { version = "0.9.0", features = [
|
embassy-net = { version = "0.9.1", features = [
|
||||||
"defmt",
|
"defmt",
|
||||||
"dhcpv4-hostname",
|
"dhcpv4-hostname",
|
||||||
"medium-ethernet",
|
"medium-ethernet",
|
||||||
@@ -50,7 +50,12 @@ esp-radio = { version = "0.18.0", features = [
|
|||||||
"wifi",
|
"wifi",
|
||||||
] }
|
] }
|
||||||
|
|
||||||
picoserve = { version = "0.18", features = ["defmt", "embassy", "json"] }
|
sntpc = { version = "0.11", default-features = false }
|
||||||
|
sntpc-net-embassy = { version = "0.11", default-features = false }
|
||||||
|
sntpc-time-embassy = { version = "0.6" }
|
||||||
|
portable-atomic = "1.15.0"
|
||||||
|
|
||||||
|
picoserve = { version = "0.19", features = ["defmt", "embassy", "json"] }
|
||||||
|
|
||||||
|
|
||||||
# For fine tuning these settings, please refer to https://doc.rust-lang.org/cargo/reference/profiles.html
|
# For fine tuning these settings, please refer to https://doc.rust-lang.org/cargo/reference/profiles.html
|
||||||
|
|||||||
+1
-1
@@ -120,7 +120,7 @@ def build_drive_shaft_bar_adapter():
|
|||||||
with BuildPart() as drive_shaft_bar_adapter:
|
with BuildPart() as drive_shaft_bar_adapter:
|
||||||
Cylinder((ext_size / 2) + thickness, height, align=(Align.CENTER, Align.CENTER, Align.MIN))
|
Cylinder((ext_size / 2) + thickness, height, align=(Align.CENTER, Align.CENTER, Align.MIN))
|
||||||
|
|
||||||
# hollow the box
|
# cut out space for the extrusion
|
||||||
with BuildSketch(Plane((0, 0, thickness))):
|
with BuildSketch(Plane((0, 0, thickness))):
|
||||||
Rectangle(ext_size, ext_size)
|
Rectangle(ext_size, ext_size)
|
||||||
with PolarLocations(ext_size / 2, 4):
|
with PolarLocations(ext_size / 2, 4):
|
||||||
|
|||||||
+9
-22
@@ -18,8 +18,8 @@ use esp_hal::timer::timg::TimerGroup;
|
|||||||
use esp_println as _;
|
use esp_println as _;
|
||||||
use esp_radio::wifi::sta::StationConfig;
|
use esp_radio::wifi::sta::StationConfig;
|
||||||
use esp_radio::wifi::{ControllerConfig, Interface, WifiController};
|
use esp_radio::wifi::{ControllerConfig, Interface, WifiController};
|
||||||
use picoserve::routing::get;
|
|
||||||
use picoserve::{AppBuilder, AppRouter};
|
use cover_theif::{http_api::{self, HttpApiProps, HttpApiService}, clock};
|
||||||
|
|
||||||
extern crate alloc;
|
extern crate alloc;
|
||||||
|
|
||||||
@@ -40,16 +40,6 @@ macro_rules! mk_static {
|
|||||||
const SSID: &str = env!("SSID");
|
const SSID: &str = env!("SSID");
|
||||||
const PASSWORD: &str = env!("PASSWORD");
|
const PASSWORD: &str = env!("PASSWORD");
|
||||||
|
|
||||||
struct AppProps;
|
|
||||||
|
|
||||||
impl AppBuilder for AppProps {
|
|
||||||
type PathRouter = impl picoserve::routing::PathRouter;
|
|
||||||
|
|
||||||
fn build_app(self) -> picoserve::Router<Self::PathRouter> {
|
|
||||||
picoserve::Router::new().route("/", get(|| async move { "Hello World" }))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[allow(
|
#[allow(
|
||||||
clippy::large_stack_frames,
|
clippy::large_stack_frames,
|
||||||
reason = "it's not unusual to allocate larger buffers etc. in main"
|
reason = "it's not unusual to allocate larger buffers etc. in main"
|
||||||
@@ -109,17 +99,9 @@ async fn main(spawner: Spawner) -> ! {
|
|||||||
info!("Got IP: {}", config.address);
|
info!("Got IP: {}", config.address);
|
||||||
}
|
}
|
||||||
|
|
||||||
let app = mk_static!(AppRouter<AppProps>, AppProps.build_app());
|
spawner.spawn(clock::ntp_upkeep_service(net_stack).unwrap());
|
||||||
|
|
||||||
let port = 80;
|
spawner.spawn(http_api_serve_task(HttpApiService::new(net_stack, Default::default(), Default::default())).unwrap());
|
||||||
let mut tcp_rx_buffer = [0; 1024];
|
|
||||||
let mut tcp_tx_buffer = [0; 1024];
|
|
||||||
let mut http_buffer = [0; 2048];
|
|
||||||
let web_serve_config = picoserve::Config::const_default().keep_connection_alive();
|
|
||||||
|
|
||||||
picoserve::Server::new(app, &web_serve_config, &mut http_buffer)
|
|
||||||
.listen_and_serve(0, net_stack, port, &mut tcp_rx_buffer, &mut tcp_tx_buffer)
|
|
||||||
.await;
|
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
info!("Hello world");
|
info!("Hello world");
|
||||||
@@ -157,3 +139,8 @@ async fn connection(mut controller: WifiController<'static>) {
|
|||||||
async fn net_task(mut runner: Runner<'static, Interface<'static>>) {
|
async fn net_task(mut runner: Runner<'static, Interface<'static>>) {
|
||||||
runner.run().await
|
runner.run().await
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[embassy_executor::task]
|
||||||
|
async fn http_api_serve_task(mut service: HttpApiService<'static, HttpApiProps>) {
|
||||||
|
service.serve().await;
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1,69 @@
|
|||||||
|
use core::net::SocketAddr;
|
||||||
|
use embassy_net::udp::{PacketMetadata, UdpSocket};
|
||||||
|
use embassy_time::{Duration, Timer};
|
||||||
|
use sntpc::{NtpContext, get_time};
|
||||||
|
use sntpc_net_embassy::UdpSocketWrapper;
|
||||||
|
use sntpc_time_embassy::EmbassyTimestampGenerator;
|
||||||
|
use portable_atomic::{AtomicU64, Ordering};
|
||||||
|
|
||||||
|
// NTP server (pool.ntp.org is the usual choice)
|
||||||
|
const NTP_SERVER: &str = "pool.ntp.org";
|
||||||
|
const NTP_PORT: u16 = 123;
|
||||||
|
|
||||||
|
static NTP_BOOT_OFFSET: AtomicU64 = AtomicU64::new(0);
|
||||||
|
|
||||||
|
pub async fn fetch_ntp_time(stack: embassy_net::Stack<'static>) -> Result<u64, &'static str> {
|
||||||
|
// Resolve the NTP server hostname
|
||||||
|
let server_addr = stack
|
||||||
|
.dns_query(NTP_SERVER, embassy_net::dns::DnsQueryType::A)
|
||||||
|
.await
|
||||||
|
.map_err(|_| "DNS resolution failed")?
|
||||||
|
.first()
|
||||||
|
.copied()
|
||||||
|
.ok_or("No DNS result")?;
|
||||||
|
|
||||||
|
let socket_addr = SocketAddr::new(server_addr.into(), NTP_PORT);
|
||||||
|
|
||||||
|
// Allocate UDP buffers (can be small — SNTP packets are tiny)
|
||||||
|
let mut rx_meta = [PacketMetadata::EMPTY; 16];
|
||||||
|
let mut rx_buf = [0u8; 48];
|
||||||
|
let mut tx_meta = [PacketMetadata::EMPTY; 16];
|
||||||
|
let mut tx_buf = [0u8; 48];
|
||||||
|
|
||||||
|
let mut socket = UdpSocket::new(stack, &mut rx_meta, &mut rx_buf, &mut tx_meta, &mut tx_buf);
|
||||||
|
socket.bind(0).map_err(|_| "bind failed")?;
|
||||||
|
|
||||||
|
let wrapped = UdpSocketWrapper::from(socket);
|
||||||
|
let ctx = NtpContext::new(EmbassyTimestampGenerator::default());
|
||||||
|
|
||||||
|
let result = get_time(socket_addr, &wrapped, ctx)
|
||||||
|
.await
|
||||||
|
.map_err(|_| "SNTP request failed")?;
|
||||||
|
|
||||||
|
// result.sec is the NTP timestamp in seconds since 1900-01-01.
|
||||||
|
// Unix epoch is 1900-01-01 + 70 years = 2_208_988_800 seconds.
|
||||||
|
const NTP_UNIX_OFFSET: u64 = 2_208_988_800;
|
||||||
|
let unix_secs = result.sec().saturating_sub(NTP_UNIX_OFFSET);
|
||||||
|
|
||||||
|
Ok(unix_secs)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn now() -> embassy_time::Instant {
|
||||||
|
embassy_time::Instant::now() + Duration::from_secs(NTP_BOOT_OFFSET.load(Ordering::Relaxed))
|
||||||
|
}
|
||||||
|
|
||||||
|
#[embassy_executor::task]
|
||||||
|
pub async fn ntp_upkeep_service(stack: embassy_net::Stack<'static>) {
|
||||||
|
loop {
|
||||||
|
match fetch_ntp_time(stack).await {
|
||||||
|
Ok(unix_secs) => {
|
||||||
|
NTP_BOOT_OFFSET.store(unix_secs - embassy_time::Instant::now().as_secs(), portable_atomic::Ordering::Relaxed);
|
||||||
|
Timer::after(Duration::from_secs(6 * 60 * 60)).await
|
||||||
|
}
|
||||||
|
Err(err) => {
|
||||||
|
defmt::error!("Failed to sync the clock from NTP: {}", err);
|
||||||
|
Timer::after(Duration::from_secs(10)).await
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
use embassy_net::Stack;
|
||||||
|
use picoserve::routing::get;
|
||||||
|
use picoserve::{AppBuilder, AppRouter, Config};
|
||||||
|
|
||||||
|
#[derive(Default)]
|
||||||
|
pub struct HttpApiProps;
|
||||||
|
|
||||||
|
impl AppBuilder for HttpApiProps {
|
||||||
|
type PathRouter = impl picoserve::routing::PathRouter;
|
||||||
|
|
||||||
|
fn build_app(self) -> picoserve::Router<Self::PathRouter> {
|
||||||
|
picoserve::Router::new().route("/", get(|| async move { "Hello World" }))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub struct HttpApiConfig {
|
||||||
|
pub port: u16,
|
||||||
|
pub web_serve_config: Config,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Default for HttpApiConfig {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self {
|
||||||
|
port: 80,
|
||||||
|
web_serve_config: Config::const_default().keep_connection_alive(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub struct HttpApiService<'a, AB: AppBuilder> {
|
||||||
|
pub config: HttpApiConfig,
|
||||||
|
|
||||||
|
net_stack: Stack<'a>,
|
||||||
|
app: AppRouter<AB>,
|
||||||
|
|
||||||
|
tcp_rx_buffer: [u8; 1024],
|
||||||
|
tcp_tx_buffer: [u8; 1024],
|
||||||
|
http_buffer: [u8; 2048],
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<'a, AB: AppBuilder> HttpApiService<'a, AB> {
|
||||||
|
pub fn new(net_stack: Stack<'a>, config: HttpApiConfig, app: AB) -> Self {
|
||||||
|
Self {
|
||||||
|
config: config,
|
||||||
|
|
||||||
|
net_stack: net_stack,
|
||||||
|
app: app.build_app(),
|
||||||
|
|
||||||
|
tcp_rx_buffer: [0; 1024],
|
||||||
|
tcp_tx_buffer: [0; 1024],
|
||||||
|
http_buffer: [0; 2048],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub async fn serve(&mut self) {
|
||||||
|
picoserve::Server::new(
|
||||||
|
&self.app,
|
||||||
|
&self.config.web_serve_config,
|
||||||
|
&mut self.http_buffer,
|
||||||
|
)
|
||||||
|
.listen_and_serve(
|
||||||
|
0,
|
||||||
|
self.net_stack,
|
||||||
|
self.config.port,
|
||||||
|
&mut self.tcp_rx_buffer,
|
||||||
|
&mut self.tcp_tx_buffer,
|
||||||
|
)
|
||||||
|
.await;
|
||||||
|
}
|
||||||
|
}
|
||||||
+11
@@ -1 +1,12 @@
|
|||||||
#![no_std]
|
#![no_std]
|
||||||
|
#![deny(
|
||||||
|
clippy::mem_forget,
|
||||||
|
reason = "mem::forget is generally not safe to do with esp_hal types, especially those \
|
||||||
|
holding buffers for the duration of a data transfer."
|
||||||
|
)]
|
||||||
|
#![deny(clippy::large_stack_frames)]
|
||||||
|
#![feature(impl_trait_in_assoc_type)]
|
||||||
|
|
||||||
|
pub mod http_api;
|
||||||
|
|
||||||
|
pub mod clock;
|
||||||
|
|||||||
Reference in New Issue
Block a user