aboutsummaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Simplify examplechemicstry2022-05-261-5/+3
| | |
| * | Fix removed spacechemicstry2022-05-261-0/+1
| | |
| * | Reimplement BufRead for BufferedUartchemicstry2022-05-262-1/+39
| |/
* / Async shared bus for SPI & I2C + rename embassy-traits (#769)Henrik Alsér2022-05-2619-19/+19
|/ | | | | | | | | | | | | | | | | | | * Rename embassy-traits to embassy-embedded-hal * Rename embassy-traits to embassy-embedded-hal * Add shared bus for SPI and I2C * rustfmt * EHA alpha 1 * Rename embedded-traits in examples * rustfmt * rustfmt Co-authored-by: Henrik Alsér <[email protected]>
* Merge pull request #771 from embassy-rs/net-splitDario Nieuwenhuis2022-05-192-3/+3
|\ | | | | net: add split() to tcpsocket
| * Make embassy-net nightly-only.Dario Nieuwenhuis2022-05-192-3/+3
| | | | | | | | | | It's useless without async traits, so juggling the `nightly` feature around is not worth the pain.
* | Merge #776bors[bot]2022-05-191-0/+26
|\ \ | |/ |/| | | | | | | | | | | 776: Automatically set ADC clock prescaler on v2 ADC to respect max frequency r=Dirbaio a=matoushybl Co-authored-by: Matous Hybl <[email protected]>
| * Automatically set ADC clock prescaler on v2 ADC to respect max frequencyMatous Hybl2022-05-181-0/+26
| |
* | Update embedded-io to 0.3Dario Nieuwenhuis2022-05-195-5/+5
| |
* | Merge branch 'embassy-rs:master' into qdecHenrik Alsér2022-05-124-5/+19
|\ \
| | \
| | \
| *-. \ Merge #763 #766bors[bot]2022-05-124-5/+19
| |\ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 763: Misc USB improvements r=Dirbaio a=Dirbaio The "simplify control in/out handlng" commit gives a -2kb code size improvement. 766: Make usb_serial examples work on windows r=Dirbaio a=timokroeger Windows shows `error 10` when using CDC ACM on non composite devices. Workaround is to use IADS: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help Co-authored-by: Dario Nieuwenhuis <[email protected]> Co-authored-by: Timo Kröger <[email protected]>
| | | * Make usb_serial examples work on windowsTimo Kröger2022-05-122-0/+14
| | |/ | |/| | | | | | | | | | | | | Windows shows `error 10` when using CDC ACM on non composite devices. Workaround is to use IADS: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
| | * usb: remove address arg from endpoint allocation.Dario Nieuwenhuis2022-05-094-5/+5
| |/
* | Merge branch 'embassy-rs:master' into qdecHenrik Alsér2022-05-0748-363/+806
|\|
| * Merge #752bors[bot]2022-05-0618-362/+40
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 752: Replace embassy::io with embedded_io. r=Dirbaio a=Dirbaio TODO: - [x] Release embedded-io on crates.io - [x] Remove git dep Co-authored-by: Dario Nieuwenhuis <[email protected]>
| | * Replace embassy::io with embedded_io.Dario Nieuwenhuis2022-05-0713-32/+38
| | |
| | * Remove embassy_hal_common::usb.Dario Nieuwenhuis2022-05-045-330/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The replacement is `embassy-usb`. There's a WIP driver for stm32 USBD in #709, there's no WIP driver for stm32 USB_OTG. This means we're left without USB_OTG support for now. Reason for removing is I'm going to soon remove `embassy::io`, and USB uses it. I don't want to spend time maintaining "dead" code that is going to be removed. Volunteers welcome, either to update old USB to the new IO, or write a USB_OTG driver fo the new USB.
| * | Add H7 flash and bootloader supportMatous Hybl2022-05-0611-0/+269
| | |
| * | Add F7 flash and bootloader supportMatous Hybl2022-05-0611-0/+270
| | |
| * | Add support for F3 flashMatous Hybl2022-05-0610-1/+227
| |/
* | Change example pinsHenrik Alsér2022-05-071-3/+2
| |
* | Add qdec moduleHenrik Alsér2022-05-071-0/+29
|/
* net: add functions to get current Eth and IP configDario Nieuwenhuis2022-05-022-2/+2
|
* Merge #743bors[bot]2022-04-301-0/+56
|\ | | | | | | | | | | | | | | | | | | | | 743: Add PLL config support for F2 r=Dirbaio a=Gekkio - minor changes to make the F2 RCC API a bit more flexible - low-level PLL config with assertions based on datasheet specs. It shouldn't be very difficult to later add a "reverse API" where you pass the clocks you want to a function and it generates a `PLLConfig` struct for you - PLL API tested on my custom board with 12 MHz HSE as source for PLL to generate max clocks for SYSCLK/AHB/APB/APB1/PLL48 - the example *should* work but is untested since I don't have the Nucleo board :disappointed: Co-authored-by: Joonas Javanainen <[email protected]>
| * Use defmt-friendly error handlingJoonas Javanainen2022-04-301-3/+3
| |
| * Add PLL example for F2Joonas Javanainen2022-04-291-0/+56
| |
* | embassy-stm32/eth: convert LAN8742 driver to generic SMI driverDavid Lenfesty2022-04-302-8/+8
|/ | | | | | | | SMI Ethernet PHYs all share a common base set of registers that can do 90% of all tasks. The LAN8742 driver used some vendor-specific registers to check link negotiation status, but the need for that was debatable, so I migrated it to a generic driver instead, anybody who wants extra functionality can copy it and impl their own on top of it.
* Fix linker script for nrf bootloader exampleUlf Lilleengen2022-04-284-1/+24
|
* Allow using separate page sizes for state and dfuUlf Lilleengen2022-04-285-5/+5
| | | | | | | * Less generics on bootloader. Keep PAGE_SIZE as a common multiple of DFU and ACTIVE page sizes. * Document restriction * Add unit tests for different page sizes
* Add bootloader to CIUlf Lilleengen2022-04-2719-36/+44
|
* Add stm32 flash + bootloader supportUlf Lilleengen2022-04-2741-22/+892
| | | | | | | | * Add flash drivers for L0, L1, L4, WB and WL. Not tested for WB, but should be similar to WL. * Add embassy-boot-stm32 for bootloading on STM32. * Add flash examples and bootloader examples * Update stm32-data
*-. Merge #734 #735bors[bot]2022-04-262-0/+53
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 734: executor: Add `Spawner::for_current_executor`. r=Dirbaio a=Dirbaio This is needed to spawn non-Send tasks in an InterruptExecutor, after the fixes in #730 . `@matoushybl` could you check if this works for your use case? 735: stm32: add stm32u5 GPDMA, SPIv4 support, add HIL tests. r=Dirbaio a=Dirbaio Co-authored-by: Dario Nieuwenhuis <[email protected]>
| | * stm32: add stm32u5 GPDMA, SPIv4 support, add HIL tests.Dario Nieuwenhuis2022-04-271-0/+29
| | |
| * | executor: Add `Spawner::for_current_executor`.Dario Nieuwenhuis2022-04-261-0/+24
| |/
* / Update to released lorawan cratesUlf Lilleengen2022-04-264-7/+7
|/
* examples/nrf: add self_spawn example.Dario Nieuwenhuis2022-04-251-0/+24
| | | | | This serves as a compile-test of possible typecheck loops due to TAIT shenanigans.
* executor: fix unsoundness in InterruptExecutor::start.Dario Nieuwenhuis2022-04-253-18/+12
| | | | | | | The initial closure is not actually called in the interrupt, so this is illegally sending non-Send futures to the interrupt. Remove the closure, and return a SendSpawner instead.
* Implement giant (chunked) DMA transfers for DCMI.Matous Hybl2022-04-251-2/+2
|
* examples/nrf: add product strings to all usb examples.Dario Nieuwenhuis2022-04-244-6/+17
|
* Add embassy-usb-ncm. Implements USBB CDC NCM (Ethernet over USB)Dario Nieuwenhuis2022-04-242-1/+280
|
* Switch to crates.io embedded-hal, embedded-hal-async.Dario Nieuwenhuis2022-04-225-40/+13
| | | | | This temporarily removes support for the async UART trait, since it's not yet in embedded-hal-async.
* Support multiple flash instances in embassy-bootUlf Lilleengen2022-04-193-6/+4
| | | | | | | | * Add FlashProvider and FlashConfig traits to define flash characteristics * Use traits in bootloader to retrieve flash handles and for copying data between flash instances * Add convenience implementations for using a single flash instance.
* Add embedded-storage trait impls for QSPIUlf Lilleengen2022-04-192-6/+4
| | | | | | | | | | * Adds implementations of embedded-storage and embedded-storage-async for QSPI * Add blocking implementations of QSPI * Use blocking implementation in new() and embedded-storage impls * Use async implementation in embedded-storage-async impls * Add FLASH_SIZE const generic parameter * Own IRQ in Qspi to disable it on drop
* usb: rename UsbDeviceBuilder -> Builder.Dario Nieuwenhuis2022-04-164-8/+8
|
* usb-hid: add Config struct, to avoid too many params.Dario Nieuwenhuis2022-04-162-17/+16
|
* usb-hid: Simplify API.Dario Nieuwenhuis2022-04-162-11/+11
| | | | | | | | | | - Renamed structs to HidReaderWriter, HidReader, HidWriter. - Removed unused const generics on `State`. - Simplified generics on `HidReaderWriter`. The class type previously was `HidClass<D, Driver<'d, USBD>, ReportReader<'d, Driver<'d, USBD>, OUT_N>, IN_N>` It's now `HidClass<D, Driver<'d, USBD>, IN_N, OUT_N>`. Note that the driver type `Driver<'d, USBD>` is no longer repeated. - Constructors are now: `HidWriter::new()` for IN-only, `HidReaderWriter::new()` for IN+OUT. No complicated bounds. - HidReaderWriter has all the methods from HidReader, HidWriter.
* Merge #711bors[bot]2022-04-144-20/+162
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 711: Add DeviceStateHandler, DeviceCommand channel, and remote wakeup support r=Dirbaio a=alexmoon Apologies for the size of this PR. Once I started getting into the Vbus power management side of my device I found a couple of areas of functionality missing from embassy-usb. Specifically, I need the application to be able to respond to changes in the USB device state in order to properly control the amount of power I'm drawing from Vbus. I also wanted to enable remote wakeup support for my device. In order to enable device state monitoring, I've created a `DeviceStateHandler` trait and made it possible to pass in an optional reference a handler implementing that trait when creating the `UsbDeviceBuilder`. Remote wakeup required a way to send commands to the bus which is exclusively owned by the `UsbDevice::run` method. This is the same problem we were discussing for enabling/disabling the device on Vbus power events. My solution is to allow an optional `Channel` to be provided to the `UsbDeviceBuilder` (via `UsbDeviceBuilder::new_with_channel`), allowing the application to send commands into the `run` method. Right now it supports enable, disable and remote wakeup commands. Since there's now a way to dynamically enable and disable the device, I also added `Config::start_enabled` to control whether or not the `UsbDevice` should start in the enabled state. That also allowed me to make `UsbDeviceBuilder::build` sync again and move enabling the bus into `UsbDevice::run`. This led to a few driver changes: 1. `Driver::enable` became `Driver::into_bus` 2. `Bus::enable`, `Bus::disable`, and `Bus::remote_wakeup` were added 3. I removed `Bus::reset`, `Bus::suspend`, and `Bus::resume` because they were only ever called based on the result of `Bus::poll`. It made more sense to me to have `Bus::poll` handle the driver-specific state management itself. I've updated the `usb_hid_keyboard` example to take advantage of all these additional features. Let me know what you think. Thanks! Co-authored-by: alexmoon <[email protected]>
| * Split UsbDevice::run into run and run_until_suspendalexmoon2022-04-131-28/+32
| |
| * Remove channel and make run future cancelablealexmoon2022-04-131-14/+49
| |
| * Remote wakeup bug fixesalexmoon2022-04-131-12/+12
| |