Basic project setup #1

Merged
an.tsouchlos merged 7 commits from feature/project_setup into master 2024-11-01 23:49:57 +00:00
7 changed files with 9881 additions and 18 deletions
Showing only changes of commit 2774b2c569 - Show all commits

View File

@ -1,7 +1,6 @@
[target.'cfg(all(target_arch = "arm", target_os = "none"))'] [target.'cfg(all(target_arch = "arm", target_os = "none"))']
# replace nRF82810_xxAA with your chip as listed in `probe-rs chip list` # replace nRF82810_xxAA with your chip as listed in `probe-rs chip list`
runner = "probe-rs run --chip nRF52810_xxAA" runner = "probe-rs run --chip nRF52832_xxAA"
#runner = "probe-rs download --chip nRF52810_xxAA"
[alias] [alias]
rr = "run --release" rr = "run --release"

314
Cargo.lock generated
View File

@ -2,6 +2,67 @@
# It is not intended for manual editing. # It is not intended for manual editing.
version = 3 version = 3
[[package]]
name = "Inflector"
version = "0.11.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3"
dependencies = [
"lazy_static",
"regex",
]
[[package]]
name = "aho-corasick"
version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
dependencies = [
"memchr",
]
[[package]]
name = "as-slice"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "45403b49e3954a4b8428a0ac21a4b7afadccf92bfd96273f1a58cd4812496ae0"
dependencies = [
"generic-array 0.12.4",
"generic-array 0.13.3",
"generic-array 0.14.7",
"stable_deref_trait",
]
[[package]]
name = "as-slice"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "516b6b4f0e40d50dcda9365d53964ec74560ad4284da2e7fc97122cd83174516"
dependencies = [
"stable_deref_trait",
]
[[package]]
name = "atomic-polyfill"
version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8cf2bce30dfe09ef0bfaef228b9d414faaf7e563035494d7fe092dba54b300f4"
dependencies = [
"critical-section",
]
[[package]]
name = "atomic-pool"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58c5fc22e05ec2884db458bf307dc7b278c9428888d2b6e6fad9c0ae7804f5f6"
dependencies = [
"as-slice 0.1.5",
"as-slice 0.2.1",
"atomic-polyfill",
"stable_deref_trait",
]
[[package]] [[package]]
name = "autocfg" name = "autocfg"
version = "1.4.0" version = "1.4.0"
@ -63,6 +124,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
name = "commonsense-sw" name = "commonsense-sw"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"atomic-pool",
"cortex-m", "cortex-m",
"cortex-m-rt", "cortex-m-rt",
"defmt", "defmt",
@ -70,9 +132,15 @@ dependencies = [
"embassy-executor", "embassy-executor",
"embassy-futures", "embassy-futures",
"embassy-nrf", "embassy-nrf",
"embassy-sync", "embassy-sync 0.6.0",
"embassy-time", "embassy-time",
"embedded-storage",
"embedded-storage-async",
"fixed", "fixed",
"futures",
"heapless",
"nrf-softdevice",
"nrf-softdevice-s132",
"panic-probe", "panic-probe",
"static_cell", "static_cell",
] ]
@ -85,7 +153,6 @@ checksum = "8ec610d8f49840a5b376c69663b6369e71f4b34484b9b2eb29fb918d92516cb9"
dependencies = [ dependencies = [
"bare-metal", "bare-metal",
"bitfield", "bitfield",
"critical-section",
"embedded-hal 0.2.7", "embedded-hal 0.2.7",
"volatile-register", "volatile-register",
] ]
@ -122,14 +189,38 @@ 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 = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
[[package]]
name = "darling"
version = "0.13.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c"
dependencies = [
"darling_core 0.13.4",
"darling_macro 0.13.4",
]
[[package]] [[package]]
name = "darling" name = "darling"
version = "0.20.10" version = "0.20.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989"
dependencies = [ dependencies = [
"darling_core", "darling_core 0.20.10",
"darling_macro", "darling_macro 0.20.10",
]
[[package]]
name = "darling_core"
version = "0.13.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610"
dependencies = [
"fnv",
"ident_case",
"proc-macro2",
"quote",
"strsim 0.10.0",
"syn 1.0.109",
] ]
[[package]] [[package]]
@ -142,17 +233,28 @@ dependencies = [
"ident_case", "ident_case",
"proc-macro2", "proc-macro2",
"quote", "quote",
"strsim", "strsim 0.11.1",
"syn 2.0.86", "syn 2.0.86",
] ]
[[package]]
name = "darling_macro"
version = "0.13.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835"
dependencies = [
"darling_core 0.13.4",
"quote",
"syn 1.0.109",
]
[[package]] [[package]]
name = "darling_macro" name = "darling_macro"
version = "0.20.10" version = "0.20.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806"
dependencies = [ dependencies = [
"darling_core", "darling_core 0.20.10",
"quote", "quote",
"syn 2.0.86", "syn 2.0.86",
] ]
@ -216,7 +318,7 @@ checksum = "5794414bc20e0d750f145bc0e82366b19dd078e9e075e8331fb8dd069a1cb6a2"
dependencies = [ dependencies = [
"defmt", "defmt",
"embassy-futures", "embassy-futures",
"embassy-sync", "embassy-sync 0.6.0",
"embassy-time", "embassy-time",
"embedded-hal 0.2.7", "embedded-hal 0.2.7",
"embedded-hal 1.0.0", "embedded-hal 1.0.0",
@ -247,7 +349,7 @@ version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c853e6bcad2d1c0811f4de404cef87363a1fa2535430cf76824c163cf75689ba" checksum = "c853e6bcad2d1c0811f4de404cef87363a1fa2535430cf76824c163cf75689ba"
dependencies = [ dependencies = [
"darling", "darling 0.20.10",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.86", "syn 2.0.86",
@ -286,7 +388,7 @@ dependencies = [
"document-features", "document-features",
"embassy-embedded-hal", "embassy-embedded-hal",
"embassy-hal-internal", "embassy-hal-internal",
"embassy-sync", "embassy-sync 0.6.0",
"embassy-time", "embassy-time",
"embassy-time-driver", "embassy-time-driver",
"embassy-usb-driver", "embassy-usb-driver",
@ -313,6 +415,19 @@ dependencies = [
"rand_core", "rand_core",
] ]
[[package]]
name = "embassy-sync"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd938f25c0798db4280fcd8026bf4c2f48789aebf8f77b6e5cf8a7693ba114ec"
dependencies = [
"cfg-if",
"critical-section",
"embedded-io-async",
"futures-util",
"heapless",
]
[[package]] [[package]]
name = "embassy-sync" name = "embassy-sync"
version = "0.6.0" version = "0.6.0"
@ -443,12 +558,48 @@ version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
[[package]]
name = "futures"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876"
dependencies = [
"futures-channel",
"futures-core",
"futures-io",
"futures-sink",
"futures-task",
"futures-util",
]
[[package]]
name = "futures-channel"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10"
dependencies = [
"futures-core",
"futures-sink",
]
[[package]] [[package]]
name = "futures-core" name = "futures-core"
version = "0.3.31" version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"
[[package]]
name = "futures-io"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6"
[[package]]
name = "futures-sink"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7"
[[package]] [[package]]
name = "futures-task" name = "futures-task"
version = "0.3.31" version = "0.3.31"
@ -462,11 +613,40 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81"
dependencies = [ dependencies = [
"futures-core", "futures-core",
"futures-sink",
"futures-task", "futures-task",
"pin-project-lite", "pin-project-lite",
"pin-utils", "pin-utils",
] ]
[[package]]
name = "generic-array"
version = "0.12.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd"
dependencies = [
"typenum",
]
[[package]]
name = "generic-array"
version = "0.13.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f797e67af32588215eaaab8327027ee8e71b9dd0b2b26996aedf20c030fce309"
dependencies = [
"typenum",
]
[[package]]
name = "generic-array"
version = "0.14.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
dependencies = [
"typenum",
"version_check",
]
[[package]] [[package]]
name = "half" name = "half"
version = "2.4.1" version = "2.4.1"
@ -502,12 +682,24 @@ version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
[[package]]
name = "lazy_static"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
[[package]] [[package]]
name = "litrs" name = "litrs"
version = "0.4.1" version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5" checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5"
[[package]]
name = "memchr"
version = "2.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
[[package]] [[package]]
name = "nb" name = "nb"
version = "0.1.3" version = "0.1.3"
@ -523,6 +715,49 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d5439c4ad607c3c23abf66de8c8bf57ba8adcd1f129e699851a6e43935d339d" checksum = "8d5439c4ad607c3c23abf66de8c8bf57ba8adcd1f129e699851a6e43935d339d"
[[package]]
name = "nrf-softdevice"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "225a21d963b2382617dbbff5953dc8c6c43fe56db5c5155f4d20a30c50c2766d"
dependencies = [
"cortex-m",
"cortex-m-rt",
"critical-section",
"defmt",
"embassy-futures",
"embassy-sync 0.5.0",
"embedded-storage",
"embedded-storage-async",
"fixed",
"futures",
"heapless",
"nrf-softdevice-macro",
"nrf-softdevice-s132",
"nrf52832-pac",
"num_enum",
]
[[package]]
name = "nrf-softdevice-macro"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3af0752f2f12e202fa29f5a8d2f6dcc8a421c7a7e368d9dab7feb6bfe24ff0e9"
dependencies = [
"Inflector",
"darling 0.13.4",
"proc-macro2",
"quote",
"syn 1.0.109",
"uuid",
]
[[package]]
name = "nrf-softdevice-s132"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a9c4f582065c2adbfcfe8feb23ba32b12a599d9fffbf6da78fd5ae89763ae48b"
[[package]] [[package]]
name = "nrf51-pac" name = "nrf51-pac"
version = "0.12.2" version = "0.12.2"
@ -664,6 +899,26 @@ dependencies = [
"autocfg", "autocfg",
] ]
[[package]]
name = "num_enum"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179"
dependencies = [
"num_enum_derive",
]
[[package]]
name = "num_enum_derive"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.86",
]
[[package]] [[package]]
name = "panic-probe" name = "panic-probe"
version = "0.3.2" version = "0.3.2"
@ -740,6 +995,35 @@ version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
[[package]]
name = "regex"
version = "1.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
dependencies = [
"aho-corasick",
"memchr",
"regex-automata",
"regex-syntax",
]
[[package]]
name = "regex-automata"
version = "0.4.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3"
dependencies = [
"aho-corasick",
"memchr",
"regex-syntax",
]
[[package]]
name = "regex-syntax"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
[[package]] [[package]]
name = "rustc_version" name = "rustc_version"
version = "0.2.3" version = "0.2.3"
@ -779,6 +1063,12 @@ dependencies = [
"portable-atomic", "portable-atomic",
] ]
[[package]]
name = "strsim"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
[[package]] [[package]]
name = "strsim" name = "strsim"
version = "0.11.1" version = "0.11.1"
@ -839,6 +1129,12 @@ version = "1.0.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe"
[[package]]
name = "uuid"
version = "1.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a"
[[package]] [[package]]
name = "vcell" name = "vcell"
version = "0.1.3" version = "0.1.3"

View File

@ -4,15 +4,22 @@ version = "0.1.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
cortex-m = { version = "0.7.7", features = ["inline-asm", "critical-section-single-core"] } atomic-pool = "1.0.1"
cortex-m = { version = "0.7.7", features = ["inline-asm"] }
cortex-m-rt = "0.7.3" cortex-m-rt = "0.7.3"
defmt = "0.3.8" defmt = "0.3.8"
defmt-rtt = "0.4.1" defmt-rtt = "0.4.1"
embassy-executor = { version = "0.6.1", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } embassy-executor = { version = "0.6.1", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] }
embassy-futures = "0.1.1" embassy-futures = "0.1.1"
embassy-nrf = { version = "0.2.0", features = ["defmt", "nrf52810", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } embassy-nrf = { version = "0.2.0", features = ["defmt", "nrf52832", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] }
embassy-sync = { version = "0.6.0", features = ["defmt"] } embassy-sync = { version = "0.6.0", features = ["defmt"] }
embassy-time = { version = "0.3.2", features = ["defmt", "defmt-timestamp-uptime"] } embassy-time = { version = "0.3.2", features = ["defmt", "defmt-timestamp-uptime"] }
embedded-storage = "0.3.1"
embedded-storage-async = "0.4.1"
fixed = "1.28.0" fixed = "1.28.0"
futures = { version = "0.3.31", default-features = false }
heapless = "0.8.0"
nrf-softdevice = { version = "0.1.0", features = ["defmt", "ble-peripheral", "ble-central", "critical-section-impl", "nrf52832", "s132"] }
nrf-softdevice-s132 = "0.1.2"
panic-probe = { version = "0.3.2", features = ["print-defmt"] } panic-probe = { version = "0.3.2", features = ["print-defmt"] }
static_cell = "2.1.0" static_cell = "2.1.0"

View File

@ -2,7 +2,37 @@
Firmware for the CommonSense project. Firmware for the CommonSense project.
## Compiling and running ## Compile and Run
The firmware depends on the S132 softdevice. Before running the firmware, the
softdevice has to flashed to the chip.
### Flashing the Softdevice
1. Erase the chip
```bash
$ probe-rs erase --chip nRF52832_xxAA
```
2. Flash the softdevice
```bash
$ probe-rs download --verify --binary-format hex --chip nRF52832_xxAA s132_nrf52_7.3.0_softdevice.hex
```
### Compile and Run
1. Install the required tools. Consult `Dockerfile` for specifics
2. Build the firmware
```bash
$ cargo build --release
```
3. Flash / run the firmware
```bash
$ cargo fr
$ # OR
$ cargo run --release
```
### Compile and Run using Docker
1. Build the docker image 1. Build the docker image
```bash ```bash
@ -24,3 +54,11 @@ Firmware for the CommonSense project.
- If flashing fails after being successful the first time, take a look at this: - If flashing fails after being successful the first time, take a look at this:
https://users.rust-lang.org/t/probe-rs-fails-to-work-after-first-time-use-successful/103234 https://users.rust-lang.org/t/probe-rs-fails-to-work-after-first-time-use-successful/103234
- This may be useful for unit testing: https://crates.io/crates/embedded-test - This may be useful for unit testing: https://crates.io/crates/embedded-test
- Currently this project is being developed on the nrf52-dk board with the
nrf52832 chip. What mature enough, it will be ported to the nrf52810 to run
on the actual hardware. Locations to modify:
- `memory.x` - consult the
[nrf-softdevice](https://github.com/embassy-rs/nrf-softdevice)
documentation for more information
- `Cargo.toml` - change the `nrf52832` feature to `nrf52810`
- `.cargo/config.toml` - change the `nrf52832` chip to `nrf52810`

View File

@ -1,7 +1,13 @@
/*MEMORY
{
FLASH : ORIGIN = 0x00000000, LENGTH = 256K
RAM : ORIGIN = 0x20000000, LENGTH = 24K
}*/
MEMORY MEMORY
{ {
/* NOTE 1 K = 1 KiBi = 1024 bytes */ /* NOTE 1 K = 1 KiBi = 1024 bytes */
FLASH : ORIGIN = 0x00000000, LENGTH = 256K /* NRF52832 with Softdevice S132 7.x and 6.x */
RAM : ORIGIN = 0x20000000, LENGTH = 24K FLASH : ORIGIN = 0x00026000, LENGTH = 512K - 152K
RAM : ORIGIN = 0x20000000 + 30K, LENGTH = 64K - 30K
} }

File diff suppressed because it is too large Load Diff

View File

@ -6,6 +6,7 @@ use embassy_executor::Spawner;
use embassy_nrf::gpio::{Level, Output, OutputDrive}; use embassy_nrf::gpio::{Level, Output, OutputDrive};
use embassy_time::Timer; use embassy_time::Timer;
use {defmt_rtt as _, panic_probe as _}; use {defmt_rtt as _, panic_probe as _};
use nrf_softdevice::{raw, Softdevice};
#[embassy_executor::main] #[embassy_executor::main]
async fn main(_spawner: Spawner) { async fn main(_spawner: Spawner) {
@ -13,7 +14,7 @@ async fn main(_spawner: Spawner) {
let mut led = Output::new(p.P0_18, Level::Low, OutputDrive::Standard); let mut led = Output::new(p.P0_18, Level::Low, OutputDrive::Standard);
info!("Starting blinky"); info!("Starting blinky");
loop { loop {
led.set_high(); led.set_high();
Timer::after_millis(300).await; Timer::after_millis(300).await;