From 60d82a7920606372032ad33155b31f373b4c5b80 Mon Sep 17 00:00:00 2001
From: Alex Martens <alex@thinglab.org>
Date: Tue, 26 Mar 2024 19:54:13 -0700
Subject: [PATCH 1/2] Cargo.lock: update

warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"`
removed aho-corasick v0.7.18
updated atomic-polyfill v0.1.8 -> v1.0.3
updated autocfg v1.1.0 -> v1.2.0
removed bit_field v0.10.1
updated bytemuck v1.14.1 -> v1.15.0
updated byteorder v1.4.3 -> v1.5.0
updated chrono v0.4.19 -> v0.4.35
updated cortex-m v0.7.5 -> v0.7.7
updated cortex-m-rt v0.7.1 -> v0.7.3
updated cortex-m-rtic v1.1.3 -> v1.1.4
updated cortex-m-rtic-macros v1.1.5 -> v1.1.6
removed critical-section v0.2.7
removed critical-section v1.1.1
added critical-section v1.1.2
updated defmt v0.3.5 -> v0.3.6
updated defmt-macros v0.3.2 -> v0.3.7
updated defmt-parser v0.3.1 -> v0.3.4
updated heapless v0.7.15 -> v0.7.17
updated indexmap v1.9.1 -> v1.9.3
removed lazy_static v1.4.0
updated lock_api v0.4.7 -> v0.4.11
removed memchr v2.5.0
updated nb v1.0.0 -> v1.1.0
updated num-integer v0.1.45 -> v0.1.46
updated num-traits v0.2.15 -> v0.2.18
updated paste v1.0.7 -> v1.0.14
updated proc-macro2 v1.0.54 -> v1.0.79
updated quote v1.0.26 -> v1.0.35
updated rand_core v0.6.3 -> v0.6.4
removed regex v1.6.0
removed regex-syntax v0.6.27
removed riscv v0.7.0
removed riscv-target v0.1.2
updated rtic-syntax v1.0.2 -> v1.0.3
updated scopeguard v1.1.0 -> v1.2.0
updated semver v1.0.12 -> v1.0.22
updated serde v1.0.164 -> v1.0.197
updated serde_derive v1.0.164 -> v1.0.197
updated spin v0.9.4 -> v0.9.8
removed syn v1.0.104
removed syn v2.0.11
added syn v1.0.109
added syn v2.0.55
added thiserror v1.0.58
added thiserror-impl v1.0.58
updated unicode-ident v1.0.2 -> v1.0.12
updated volatile-register v0.2.1 -> v0.2.2
---
 Cargo.lock        | 259 ++++++++++++++++++----------------------------
 client/Cargo.toml |   1 +
 server/Cargo.toml |   1 +
 3 files changed, 105 insertions(+), 156 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock
index 9e418ca..e601168 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,29 +2,20 @@
 # It is not intended for manual editing.
 version = 3
 
-[[package]]
-name = "aho-corasick"
-version = "0.7.18"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f"
-dependencies = [
- "memchr",
-]
-
 [[package]]
 name = "atomic-polyfill"
-version = "0.1.8"
+version = "1.0.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e14bf7b4f565e5e717d7a7a65b2a05c0b8c96e4db636d6f780f03b15108cdd1b"
+checksum = "8cf2bce30dfe09ef0bfaef228b9d414faaf7e563035494d7fe092dba54b300f4"
 dependencies = [
- "critical-section 0.2.7",
+ "critical-section",
 ]
 
 [[package]]
 name = "autocfg"
-version = "1.1.0"
+version = "1.2.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80"
 
 [[package]]
 name = "bare-metal"
@@ -41,12 +32,6 @@ version = "1.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "f8fe8f5a8a398345e52358e18ff07cc17a568fbca5c6f73873d3a62056309603"
 
-[[package]]
-name = "bit_field"
-version = "0.10.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dcb6dd1c2376d2e096796e234a70e17e94cc2d5d54ff8ce42b28cef1d0d359a4"
-
 [[package]]
 name = "bitfield"
 version = "0.13.2"
@@ -61,15 +46,15 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
 
 [[package]]
 name = "bytemuck"
-version = "1.14.1"
+version = "1.15.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed2490600f404f2b94c167e31d3ed1d5f3c225a0f3b80230053b3e0b7b962bd9"
+checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15"
 
 [[package]]
 name = "byteorder"
-version = "1.4.3"
+version = "1.5.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
+checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
 
 [[package]]
 name = "cfg-if"
@@ -79,11 +64,10 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
 
 [[package]]
 name = "chrono"
-version = "0.4.19"
+version = "0.4.35"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73"
+checksum = "8eaf5903dcbc0a39312feb77df2ff4c76387d591b9fc7b04a238dcf8bb62639a"
 dependencies = [
- "num-integer",
  "num-traits",
 ]
 
@@ -92,6 +76,7 @@ name = "client"
 version = "0.1.0"
 dependencies = [
  "bytemuck",
+ "cortex-m",
  "cortex-m-rtic",
  "defmt",
  "defmt-rtt",
@@ -109,21 +94,22 @@ checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15"
 
 [[package]]
 name = "cortex-m"
-version = "0.7.5"
+version = "0.7.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cd20d4ac4aa86f4f75f239d59e542ef67de87cce2c282818dc6e84155d3ea126"
+checksum = "8ec610d8f49840a5b376c69663b6369e71f4b34484b9b2eb29fb918d92516cb9"
 dependencies = [
  "bare-metal 0.2.5",
  "bitfield",
+ "critical-section",
  "embedded-hal",
  "volatile-register",
 ]
 
 [[package]]
 name = "cortex-m-rt"
-version = "0.7.1"
+version = "0.7.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c433da385b720d5bb9f52362fa2782420798e68d40d67bfe4b0d992aba5dfe7"
+checksum = "ee84e813d593101b1723e13ec38b6ab6abbdbaaa4546553f5395ed274079ddb1"
 dependencies = [
  "cortex-m-rt-macros",
 ]
@@ -136,14 +122,14 @@ checksum = "f0f6f3e36f203cfedbc78b357fb28730aa2c6dc1ab060ee5c2405e843988d3c7"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 1.0.104",
+ "syn 1.0.109",
 ]
 
 [[package]]
 name = "cortex-m-rtic"
-version = "1.1.3"
+version = "1.1.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c6b82f1c39acd6c3a35c2013b6110c20f5bc534522791fabadeed49ccada2dce"
+checksum = "d696ae7390bdb9f7978f71ca7144256a2c4616240a6df9002da3c451f9fc8f02"
 dependencies = [
  "bare-metal 1.0.0",
  "cortex-m",
@@ -156,40 +142,28 @@ dependencies = [
 
 [[package]]
 name = "cortex-m-rtic-macros"
-version = "1.1.5"
+version = "1.1.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e8e9645ef54bec1cf70ac33e9bf9566e6507ab5b41ae6baf3735662194e8607"
+checksum = "eefb40b1ca901c759d29526e5c8a0a1b246c20caaa5b4cc5d0f0b94debecd4c7"
 dependencies = [
  "proc-macro-error",
  "proc-macro2",
  "quote",
  "rtic-syntax",
- "syn 1.0.104",
-]
-
-[[package]]
-name = "critical-section"
-version = "0.2.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "95da181745b56d4bd339530ec393508910c909c784e8962d15d722bacf0bcbcd"
-dependencies = [
- "bare-metal 1.0.0",
- "cfg-if",
- "cortex-m",
- "riscv",
+ "syn 1.0.109",
 ]
 
 [[package]]
 name = "critical-section"
-version = "1.1.1"
+version = "1.1.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6548a0ad5d2549e111e1f6a11a6c2e2d00ce6a3dafe22948d67c2b443f775e52"
+checksum = "7059fff8937831a9ae6f0fe4d658ffabf58f2ca96aa9dec1c889f936f705f216"
 
 [[package]]
 name = "defmt"
-version = "0.3.5"
+version = "0.3.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a8a2d011b2fee29fb7d659b83c43fce9a2cb4df453e16d441a51448e448f3f98"
+checksum = "3939552907426de152b3c2c6f51ed53f98f448babd26f28694c95f5906194595"
 dependencies = [
  "bitflags",
  "defmt-macros",
@@ -197,22 +171,25 @@ dependencies = [
 
 [[package]]
 name = "defmt-macros"
-version = "0.3.2"
+version = "0.3.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6d944432e281084511691b36e5e9c794c19c33675822c9019e3b64f5b89e10da"
+checksum = "18bdc7a7b92ac413e19e95240e75d3a73a8d8e78aa24a594c22cbb4d44b4bbda"
 dependencies = [
  "defmt-parser",
  "proc-macro-error",
  "proc-macro2",
  "quote",
- "syn 1.0.104",
+ "syn 2.0.55",
 ]
 
 [[package]]
 name = "defmt-parser"
-version = "0.3.1"
+version = "0.3.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0db23d29972d99baa3de2ee2ae3f104c10564a6d05a346eb3f4c4f2c0525a06e"
+checksum = "ff4a5fefe330e8d7f31b16a318f9ce81000d8e35e69b93eae154d16d2278f70f"
+dependencies = [
+ "thiserror",
+]
 
 [[package]]
 name = "defmt-rtt"
@@ -220,7 +197,7 @@ version = "0.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "609923761264dd99ed9c7d209718cda4631c5fe84668e0f0960124cbb844c49f"
 dependencies = [
- "critical-section 1.1.1",
+ "critical-section",
  "defmt",
 ]
 
@@ -251,9 +228,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
 
 [[package]]
 name = "heapless"
-version = "0.7.15"
+version = "0.7.17"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9f6733da246dc2af610133c8be0667170fd68e8ca5630936b520300eee8846f9"
+checksum = "cdc6457c0eb62c71aac4bc17216026d8410337c4126773b9c5daba343f17964f"
 dependencies = [
  "atomic-polyfill",
  "hash32",
@@ -265,50 +242,38 @@ dependencies = [
 
 [[package]]
 name = "indexmap"
-version = "1.9.1"
+version = "1.9.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e"
+checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
 dependencies = [
  "autocfg",
  "hashbrown",
 ]
 
-[[package]]
-name = "lazy_static"
-version = "1.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
-
 [[package]]
 name = "lock_api"
-version = "0.4.7"
+version = "0.4.11"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53"
+checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45"
 dependencies = [
  "autocfg",
  "scopeguard",
 ]
 
-[[package]]
-name = "memchr"
-version = "2.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
-
 [[package]]
 name = "nb"
 version = "0.1.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "801d31da0513b6ec5214e9bf433a77966320625a37860f910be265be6e18d06f"
 dependencies = [
- "nb 1.0.0",
+ "nb 1.1.0",
 ]
 
 [[package]]
 name = "nb"
-version = "1.0.0"
+version = "1.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "546c37ac5d9e56f55e73b677106873d9d9f5190605e41a856503623648488cae"
+checksum = "8d5439c4ad607c3c23abf66de8c8bf57ba8adcd1f129e699851a6e43935d339d"
 
 [[package]]
 name = "nucleo-wl55jc-bsp"
@@ -322,19 +287,18 @@ dependencies = [
 
 [[package]]
 name = "num-integer"
-version = "0.1.45"
+version = "0.1.46"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"
+checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
 dependencies = [
- "autocfg",
  "num-traits",
 ]
 
 [[package]]
 name = "num-traits"
-version = "0.2.15"
+version = "0.2.18"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
+checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a"
 dependencies = [
  "autocfg",
 ]
@@ -351,9 +315,9 @@ dependencies = [
 
 [[package]]
 name = "paste"
-version = "1.0.7"
+version = "1.0.14"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0c520e05135d6e763148b6426a837e239041653ba7becd2e538c076c738025fc"
+checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c"
 
 [[package]]
 name = "postcard"
@@ -375,7 +339,7 @@ dependencies = [
  "proc-macro-error-attr",
  "proc-macro2",
  "quote",
- "syn 1.0.104",
+ "syn 1.0.109",
  "version_check",
 ]
 
@@ -392,65 +356,27 @@ dependencies = [
 
 [[package]]
 name = "proc-macro2"
-version = "1.0.54"
+version = "1.0.79"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e472a104799c74b514a57226160104aa483546de37e839ec50e3c2e41dd87534"
+checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e"
 dependencies = [
  "unicode-ident",
 ]
 
 [[package]]
 name = "quote"
-version = "1.0.26"
+version = "1.0.35"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc"
+checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef"
 dependencies = [
  "proc-macro2",
 ]
 
 [[package]]
 name = "rand_core"
-version = "0.6.3"
+version = "0.6.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7"
-
-[[package]]
-name = "regex"
-version = "1.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b"
-dependencies = [
- "aho-corasick",
- "memchr",
- "regex-syntax",
-]
-
-[[package]]
-name = "regex-syntax"
-version = "0.6.27"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244"
-
-[[package]]
-name = "riscv"
-version = "0.7.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6907ccdd7a31012b70faf2af85cd9e5ba97657cc3987c4f13f8e4d2c2a088aba"
-dependencies = [
- "bare-metal 1.0.0",
- "bit_field",
- "riscv-target",
-]
-
-[[package]]
-name = "riscv-target"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "88aa938cda42a0cf62a20cfe8d139ff1af20c2e681212b5b34adb5a58333f222"
-dependencies = [
- "lazy_static",
- "regex",
-]
+checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
 
 [[package]]
 name = "rtic-core"
@@ -466,14 +392,14 @@ checksum = "fb8b0b822d1a366470b9cea83a1d4e788392db763539dc4ba022bcc787fece82"
 
 [[package]]
 name = "rtic-syntax"
-version = "1.0.2"
+version = "1.0.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3ad3ae243dd8d0a1b064615f664d4fa7e63929939074c564cbe5efdc4c503065"
+checksum = "5f5e215601dc467752c2bddc6284a622c6f3d2bab569d992adcd5ab7e4cb9478"
 dependencies = [
  "indexmap",
  "proc-macro2",
  "quote",
- "syn 1.0.104",
+ "syn 1.0.109",
 ]
 
 [[package]]
@@ -491,14 +417,14 @@ version = "0.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
 dependencies = [
- "semver 1.0.12",
+ "semver 1.0.22",
 ]
 
 [[package]]
 name = "scopeguard"
-version = "1.1.0"
+version = "1.2.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
+checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
 
 [[package]]
 name = "semver"
@@ -511,9 +437,9 @@ dependencies = [
 
 [[package]]
 name = "semver"
-version = "1.0.12"
+version = "1.0.22"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a2333e6df6d6598f2b1974829f853c2b4c5f4a6e503c10af918081aa6f8564e1"
+checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca"
 
 [[package]]
 name = "semver-parser"
@@ -523,22 +449,22 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
 
 [[package]]
 name = "serde"
-version = "1.0.164"
+version = "1.0.197"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d"
+checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2"
 dependencies = [
  "serde_derive",
 ]
 
 [[package]]
 name = "serde_derive"
-version = "1.0.164"
+version = "1.0.197"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68"
+checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.11",
+ "syn 2.0.55",
 ]
 
 [[package]]
@@ -546,6 +472,7 @@ name = "server"
 version = "0.1.0"
 dependencies = [
  "bytemuck",
+ "cortex-m",
  "cortex-m-rtic",
  "defmt",
  "defmt-rtt",
@@ -566,9 +493,9 @@ dependencies = [
 
 [[package]]
 name = "spin"
-version = "0.9.4"
+version = "0.9.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f6002a767bff9e83f8eeecf883ecb8011875a21ae8da43bffb817a57e78cc09"
+checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
 dependencies = [
  "lock_api",
 ]
@@ -609,7 +536,7 @@ dependencies = [
  "cortex-m-rt",
  "defmt",
  "embedded-hal",
- "nb 1.0.0",
+ "nb 1.1.0",
  "num-integer",
  "num-traits",
  "paste",
@@ -620,9 +547,9 @@ dependencies = [
 
 [[package]]
 name = "syn"
-version = "1.0.104"
+version = "1.0.109"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4ae548ec36cf198c0ef7710d3c230987c2d6d7bd98ad6edc0274462724c585ce"
+checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -631,20 +558,40 @@ dependencies = [
 
 [[package]]
 name = "syn"
-version = "2.0.11"
+version = "2.0.55"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "21e3787bb71465627110e7d87ed4faaa36c1f61042ee67badb9e2ef173accc40"
+checksum = "002a1b3dbf967edfafc32655d0f377ab0bb7b994aa1d32c8cc7e9b8bf3ebb8f0"
 dependencies = [
  "proc-macro2",
  "quote",
  "unicode-ident",
 ]
 
+[[package]]
+name = "thiserror"
+version = "1.0.58"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297"
+dependencies = [
+ "thiserror-impl",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "1.0.58"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.55",
+]
+
 [[package]]
 name = "unicode-ident"
-version = "1.0.2"
+version = "1.0.12"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "15c61ba63f9235225a22310255a29b806b907c9b8c964bcbd0a2c70f3f2deea7"
+checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
 
 [[package]]
 name = "vcell"
@@ -666,9 +613,9 @@ checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
 
 [[package]]
 name = "volatile-register"
-version = "0.2.1"
+version = "0.2.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ee8f19f9d74293faf70901bc20ad067dc1ad390d2cbf1e3f75f721ffee908b6"
+checksum = "de437e2a6208b014ab52972a27e59b33fa2920d3e00fe05026167a1c509d19cc"
 dependencies = [
  "vcell",
 ]
diff --git a/client/Cargo.toml b/client/Cargo.toml
index 848ba72..6c277ac 100644
--- a/client/Cargo.toml
+++ b/client/Cargo.toml
@@ -7,6 +7,7 @@ license = "MIT"
 
 [dependencies]
 bytemuck = "1"
+cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] }
 cortex-m-rtic = "1.0.0"
 defmt = "0.3"
 defmt-rtt = "0.4"
diff --git a/server/Cargo.toml b/server/Cargo.toml
index 147270d..6c785b0 100644
--- a/server/Cargo.toml
+++ b/server/Cargo.toml
@@ -8,6 +8,7 @@ license = "MIT"
 [dependencies]
 bytemuck = "1"
 cortex-m-rtic = "1.0.0"
+cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] }
 defmt = "0.3"
 defmt-rtt = "0.4"
 panic-probe = { version = "0.3", features = ["print-defmt" ] }

From 7886e8b04b6febd76bda69611a99eaa97bea0848 Mon Sep 17 00:00:00 2001
From: Alex Martens <alex@thinglab.org>
Date: Tue, 26 Mar 2024 20:04:50 -0700
Subject: [PATCH 2/2] fix chrono deprecations

---
 client/src/main.rs | 15 +++++++--------
 server/src/main.rs |  8 ++++----
 2 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/client/src/main.rs b/client/src/main.rs
index 39c8c5f..c3764fd 100644
--- a/client/src/main.rs
+++ b/client/src/main.rs
@@ -15,7 +15,7 @@ use defmt_rtt as _; // global logger
 use hal::{
     adc::{self, Adc},
     aes::Aes,
-    chrono::{NaiveDate, NaiveDateTime},
+    chrono::{DateTime, NaiveDate, NaiveDateTime, Utc},
     cortex_m::{delay::Delay, peripheral::syst::SystClkSource},
     dma::{AllDma, Dma1Ch1, Dma1Ch2},
     embedded_hal::digital::v2::ToggleableOutputPin,
@@ -112,9 +112,8 @@ fn locked_radio(
                 let timestamp_millis: i64 = i64::from(data[0]) << 32 | i64::from(data[1]);
                 let secs: i64 = timestamp_millis / 1000;
                 let nsec: u32 = unwrap!(u32::try_from(timestamp_millis % 1000).ok()) * 1_000_000;
-                let date_time: NaiveDateTime =
-                    unwrap!(NaiveDateTime::from_timestamp_opt(secs, nsec));
-                rtc.set_date_time(date_time);
+                let date_time: DateTime<Utc> = unwrap!(DateTime::from_timestamp(secs, nsec));
+                rtc.set_date_time(date_time.naive_utc());
                 defmt::info!("set date time to {}", defmt::Display2Format(&date_time));
 
                 unwrap!(unsafe { sg.set_sleep(SLEEP_CFG) });
@@ -311,8 +310,8 @@ mod app {
         // check RTC is setup and we have not exhausted the rate limit
         ctx.shared.rtc.lock(|rtc| match rtc.date_time() {
             Some(date_time) => {
-                let min_date: NaiveDate = NaiveDate::from_ymd(2021, 9, 11);
-                let min_date_time: NaiveDateTime = min_date.and_hms(0, 0, 0);
+                let min_date: NaiveDate = unwrap!(NaiveDate::from_ymd_opt(2021, 9, 11));
+                let min_date_time: NaiveDateTime = unwrap!(min_date.and_hms_opt(0, 0, 0));
                 if date_time < min_date_time {
                     defmt::warn!(
                         "ignoring PB3 IRQ, RTC date is in the past {}",
@@ -320,7 +319,7 @@ mod app {
                     );
                 }
 
-                let timestamp: i64 = date_time.timestamp_millis();
+                let timestamp: i64 = date_time.and_utc().timestamp_millis();
                 if prev.saturating_add(300) > timestamp {
                     defmt::warn!("ignoring PB3 IRQ, rate limited to 300 ms");
                 } else {
@@ -433,7 +432,7 @@ mod app {
 
                 // fill IV
                 iv[0] = unwrap!(rng.try_u32());
-                let millis: i64 = unwrap!(rtc.date_time()).timestamp_millis();
+                let millis: i64 = unwrap!(rtc.date_time()).and_utc().timestamp_millis();
                 iv[1] = (millis >> 32) as u32;
                 iv[2] = millis as u32;
 
diff --git a/server/src/main.rs b/server/src/main.rs
index 132e809..0182166 100644
--- a/server/src/main.rs
+++ b/server/src/main.rs
@@ -89,8 +89,8 @@ mod app {
 
         // this is a security problem that needs to be fixed
         // the server should have the time set by an up-to-date source.
-        let date: NaiveDate = NaiveDate::from_ymd(2021, 9, 11);
-        let date_time: NaiveDateTime = date.and_hms(10, 47, 25);
+        let date: NaiveDate = unwrap!(NaiveDate::from_ymd_opt(2021, 9, 11));
+        let date_time: NaiveDateTime = unwrap!(date.and_hms_opt(10, 47, 25));
         rtc.set_date_time(date_time);
 
         unwrap!(setup_radio(&mut sg));
@@ -171,7 +171,7 @@ mod app {
                     BASE_PACKET_PARAMS.set_payload_len(PKT_LEN);
                 unwrap!(sg.set_packet_params(&PACKET_PARAMS));
 
-                let millis: i64 = unwrap!(rtc.date_time()).timestamp_millis();
+                let millis: i64 = unwrap!(rtc.date_time()).and_utc().timestamp_millis();
                 buf[0] = *time_sync_cnt;
                 buf[1] = (millis >> 32) as u32;
                 buf[2] = millis as u32;
@@ -214,7 +214,7 @@ mod app {
                 }[..(len as usize) - IV_AND_TAG_LEN];
 
                 // verify message was sent recently
-                let now: i64 = unwrap!(rtc.date_time()).timestamp_millis();
+                let now: i64 = unwrap!(rtc.date_time()).and_utc().timestamp_millis();
                 let msg_millis: i64 = i64::from(iv[1]) << 32 | i64::from(iv[2]);
                 let elapsed: i64 = now - msg_millis;
                 defmt::info!("client-server time Δ: {} ms", elapsed);