aboutsummaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
...
* | | usb: use InterfaceNumber in msos.Dario Nieuwenhuis2023-02-081-1/+2
| | |
* | | usb: unify ControlHandler+DeviceStateHandler, route all control requests to ↵Dario Nieuwenhuis2023-02-0819-30/+13
| | | | | | | | | | | | | | | | | | | | | | | | all handlers. - Allows classes to handle vendor requests. - Allows classes to use a single handler for multiple interfaces. - Allows classes to access the other events (previously only `reset` was available).
* | | Lazily encode UTF16 values and add docsalexmoon2023-02-071-17/+8
| | |
* | | Convert MS OS descriptor builder to a writer APIalexmoon2023-02-072-1/+145
| | | | | | | | | | | | | | | | | | This brings it inline with the other embassy-usb descriptor APIs and allows it to integrate well with the Builder to allow class constructors to add MS OS descriptors. Also adds a `usb_serial_winusb` example to demonstrate how to use the API.
* | | nrf: docs.Dario Nieuwenhuis2023-02-0110-25/+25
| | |
| | |
| \ \
*-. \ \ Merge #1173 #1174bors[bot]2023-01-243-3/+3
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1173: nRF examples crates names r=lulf a=davidedellagiustina Fixed nRF examples crates' names: they had the same names and they were conflicting during compilation (Cargo warning). 1174: add missing copy of icmpv6 checksum r=lulf a=lulf add proto-ipv6 feature to stm32h7 example to catch issues in CI Co-authored-by: Davide Della Giustina <[email protected]> Co-authored-by: Ulf Lilleengen <[email protected]>
| | * | | add missing copy of icmpv6 checksumUlf Lilleengen2023-01-241-1/+1
| |/ / / |/| | | | | | | | | | | add proto-ipv6 feature to stm32h7 example to catch issues in CI
| * | | Changed crates' names for nrf examples since they were conflictingDavide Della Giustina2023-01-242-2/+2
|/ / /
* | | net: allocate space for 2 sockets, needed for dhcp.Dario Nieuwenhuis2023-01-198-8/+8
| | |
* | | Add smoltcp dhcp socket configurationPaweł Jan Czochański2023-01-199-67/+29
| | |
* | | stm32/usb_otg: Add F4 usb_ethernet examplechemicstry2023-01-182-1/+174
| | |
* | | stm32: add stm32c0 examples.Dario Nieuwenhuis2023-01-176-0/+114
| | |
* | | Merge #1142bors[bot]2023-01-141-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1142: More rp2040 BufferedUart fixes r=Dirbaio a=timokroeger * Refactor init code * Make it possible to drop RX without breaking TX (or vice versa) * Correctly handle RX buffer full scenario Co-authored-by: Timo Kröger <[email protected]>
| * | | rp: Fix BufferedUart drop codeTimo Kröger2023-01-041-1/+1
| | | | | | | | | | | | | | | | Only unregister the interrupt handler when both parts are inactive
* | | | Merge #1147bors[bot]2023-01-122-1/+6
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1147: Support codesigning in the firmware updater r=lulf a=huntc This PR provides a method to verify that firmware has been SHA-512 hashed and signed with a private key given its public key. The implementation provides both [`ed25519-dalek`](https://github.com/dalek-cryptography/ed25519-dalek/blob/main/Cargo.toml) and [`salty`](https://github.com/ycrypto/salty) as the signature verifiers. Either of the `ed25519-dalek` and `ed25519-salty` features is required to enable the functionality from `embassy-boot`. The `verify_and_mark_updated` method is used in place of `mark_updated` when signing is used via its feature. This avoids the accidental omission of validation where it has been declared as required at compile time. It also keeps the parity of calls at the same number to the previous situation. The PR permits other types of signature verifiers in the future on the proviso that the [Signature trait](https://github.com/RustCrypto/traits/tree/master/signature) is supported. Finally, I've updated the CI to include testing `embassy-boot`, which it was doing before. In addition, I've included a unit test for verification based on a `ed25519-dalek` documentation example. This tests both the `dalek` and `salty` implementations. In terms of code size comparisons, `dalek` adds about 68KiB and `salty` adds about 20KiB. I'm using `salty` myself. I've also tested this out by signing my code with the OpenBSD `signify` utility and then verify it during firmware upload using `salty`. Co-authored-by: huntc <[email protected]>
| * | | | Support codesigning in the firmware updaterhuntc2023-01-122-1/+6
| | | | | | | | | | | | | | | | | | | | This commit provides a method to verify that firmware has been signed with a private key given its public key. The implementation uses ed25519-dalek as the signature verifier. An "ed25519" feature is required to enable the functionality. When disabled (the default), calling the firmware updater's verify method will return a failure.
* | | | | stm32 otg: add examples.chemicstry2023-01-1110-5/+542
|/ / / /
* | | | Reduce amount of samples for nrf5340Dominik Boehi2023-01-097-305/+0
| | | |
* | | | Rename examples/nrf to examples/nrf52840Dominik Boehi2023-01-0955-0/+0
| | | |
* | | | Change UART pins for nRF5340 DKDominik Boehi2023-01-082-2/+2
| | | |
* | | | Add samples for nrf5340Dominik Boehi2023-01-0814-0/+542
| | | |
* | | | Merge #1141bors[bot]2023-01-056-7/+51
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1141: feat: compile bootloader examples for nRF91 r=lulf a=lulf * Add nRF91 as target in CI builds * Add example linker scripts for nrf91 * Make less nRF52 assumptions example config * Add llvm-tools-preview required for cargo objcopy example Co-authored-by: Ulf Lilleengen <[email protected]>
| * | | | feat: compile bootloader examples for nRF91Ulf Lilleengen2023-01-046-7/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add nRF91 as target in CI builds * Add example linker scripts for nrf91 * Make less nRF52 assumptions example config * Add llvm-tools-preview required for cargo objcopy example
* | | | | rp2040: add {tx,rx}-only constructors to UARTPedro Ferreira2023-01-041-0/+42
|/ / / /
* | | | Merge #1139bors[bot]2023-01-047-5/+34
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1139: Wdt config changes r=lulf a=huntc Per commits: * By passing WDT config around we can control it more easily and promote sharing it between files. * The memory layout of the s140 crept into a number of memory files, which can cause confusion (well, it did for me!). * Obtaining the current WDT config is useful so that we do not have to duplicate configurations around the place. A constructor method has been introduced that attempts to return the current running WDT config from the WDT peripheral. The bootloader example has also been updated to show how the watchdog can be obtained and used. Co-authored-by: huntc <[email protected]>
| * | | | Provides a means of obtaining the current WDT confighuntc2023-01-041-0/+18
| | | | | | | | | | | | | | | | | | | | Obtaining the current WDT config is important so that we do not have to duplication configuration around the place. A constructor method has been introduced that returns WDT config in accordance with how the register is presently configured. The bootloader example has also been updated to show the watchdog can be obtained and used.
| * | | | Cleaned up some doc and memory layouthuntc2023-01-045-4/+8
| | | | | | | | | | | | | | | | | | | | The memory layout of the s140 crept into a number of memory files, which can cause confusion.
| * | | | Pass WDT config aroundhuntc2023-01-041-1/+8
| |/ / / | | | | | | | | | | | | By passing WDT config around we can control it more easily and promote sharing it between files.
* | | | Cleanupkalkyl2023-01-031-1/+1
| | | |
* | | | embassy-boot (rp): Add WatchdogFlashkalkyl2023-01-033-3/+12
|/ / /
| | |
| \ \
*-. \ \ Merge #1093 #1127bors[bot]2023-01-021-0/+33
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1093: Add random example r=Dirbaio a=miathedev Thanks Lulf for the help! This should be added as example so other people can look it up easily. With love, Mia 1127: clean up doc comment generation r=Dirbaio a=Weshnaw I noticed that when I created doc comments for my tasks that the doc comments got included on the inner function but not the outer functions, I personally prefer keeping the documentation as clean as possible so this PR aims to hide the inner function and then add doc comments to the outer function. The actual changes include: * adding #[doc(hidden)] onto the `task_inner` function * I flip flopped on this one because I could imagine someone may want this in their docs, but decided to include but I think arguments could be made either way * copy the attributes from `task_inner` to `task_outer` * I don't work with proc_macros often so I am not entirely sure if the way I went about it is correct but it seems to work fine * specifically: using `parse_quote` to create the `task_outer` as a `ItemFn` then duplicating the attributes from `task_inner` to `task_outer` * I also am not sure if it's a good idea to duplicate all attributes over, but I honestly wasn't sure how to just get the just doc comment attributes ![OLD doc](https://user-images.githubusercontent.com/3748858/209456006-bfa6d40d-d3bf-4c1d-a2de-cf40828b58e5.png) ![NEW doc](https://user-images.githubusercontent.com/3748858/209456011-995363a3-f5b1-4ea3-9db9-1c566643efcb.png) Co-authored-by: miathedev <[email protected]> Co-authored-by: Brendon Fallquist <[email protected]>
| * | | | Add random examplemiathedev2022-12-041-0/+33
| | | | |
* | | | | rp: switch to released 0.2.1 pio crate.Dario Nieuwenhuis2022-12-261-4/+1
| | | | |
* | | | | net: split driver trait to a separate crate.Dario Nieuwenhuis2022-12-267-11/+12
| | | | |
* | | | | net: remove unused pool-x featuresDario Nieuwenhuis2022-12-266-6/+6
| |/ / / |/| | |
* | | | Remove lifetime, use pac fieldskalkyl2022-12-241-3/+3
| | | |
* | | | embassy-rp: Add Watchdogkalkyl2022-12-241-0/+48
| | | |
* | | | Change log level to debugkalkyl2022-12-231-1/+1
| | | |
* | | | embassy-rp: Add split() to BufferedUartkalkyl2022-12-222-1/+58
| | | |
* | | | enabled interrupt feature@imrank032022-12-211-2/+2
| | | |
* | | | added watchdog example@imrank032022-12-211-0/+25
| | | |
* | | | added priority based example@imrank032022-12-211-0/+139
| | | |
* | | | added interrupt example@imrank032022-12-211-0/+27
| | | |
* | | | button controlled example@imrank032022-12-211-0/+64
| | | |
* | | | cargo fmtAaron Tsui2022-12-201-2/+2
| | | |
* | | | add convert_to_celsius function in the adc moduleAaron Tsui2022-12-201-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | modify RP2040 adc example to get inside biased bipolar diode voltage, then convert this temperature sensor data into Celsius degree, according to chapter 4.9.5. Temperature Sensor in RP2040 datasheet.
* | | | examples/std: update to new embassy-net trait.Dario Nieuwenhuis2022-12-131-55/+58
| | | |
* | | | stm32: rename feature `net` to `embassy-net`.Dario Nieuwenhuis2022-12-132-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The eth code is always built and available, but has no own API (other than the embassy-net Device impl) to rx/tx packets. We could add this API in the future, so the feature only means "embassy-net support".
* | | | stm32/eth_v2: update to new embassy-net trait, remove PeripheralMutex.Dario Nieuwenhuis2022-12-132-44/+42
| | | |
* | | | stm32/eth_v1: update to new embassy-net trait, remove PeripheralMutex.Dario Nieuwenhuis2022-12-131-25/+25
| | | |