aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32f4/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #1244 from embassy-rs/interruptexecutorDario Nieuwenhuis2023-03-011-13/+23
|\ | | | | cortex-m/executor: don't use the owned interrupts system.
| * cortex-m/executor: don't use the owned interrupts system.Dario Nieuwenhuis2023-02-281-13/+23
| | | | | | | | Preparation for #1224.
* | Example fixes.Dario Nieuwenhuis2023-03-011-8/+3
|/
* stm32/sdmmc: Implement proper clock configurationchemicstry2023-02-231-1/+2
|
* stm32/sdmmc: Fix SDIOv1 writeschemicstry2023-02-181-2/+37
|
* usb: unify ControlHandler+DeviceStateHandler, route all control requests to ↵Dario Nieuwenhuis2023-02-082-2/+0
| | | | | | | | 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).
* stm32/usb_otg: Add F4 usb_ethernet examplechemicstry2023-01-181-0/+169
|
* stm32 otg: add examples.chemicstry2023-01-111-0/+106
|
* Merge #1024bors[bot]2022-10-261-3/+28
|\ | | | | | | | | | | | | | | | | | | | | | | 1024: stm32/adc: Remove voltage and temperature conversions r=Dirbaio a=GrantM11235 The current conversion utilities are confusing and a bit of a footgun. (Two out of the three examples got it wrong! They didn't measure vref at all, so all the conversions are completely wrong if vcca isn't 3.3v) I think we should eventually have some sort of conversion utilities in the HAL, but for now I think it is best to just remove it and let the users do their own math. cc `@chemicstry` Co-authored-by: Grant Miller <[email protected]>
| * Improve examplesGrant Miller2022-10-241-4/+8
| |
| * stm32/adc: Remove voltage and temperature conversionsGrant Miller2022-10-241-3/+24
| |
* | Merge #1025bors[bot]2022-10-261-0/+45
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1025: Implement I2C timeouts, second attempt r=Dirbaio a=chemicstry This is an alterrnative to #1022 as discussed there. Timeouts are implemented using suggested `check_timeout: impl Fn() -> Result<(), Error>` function, which does not depend on `embassy-time` by default and is a noop for regular I2C. This also adds `time` feature like in `embassy-nrf` to enable `embassy-time` dependencies. While at it, I also gated some other peripherals that depend on `embassy-time`, notably `usb` and (partially) `subghz`. `TimeoutI2c` is currently only implemented for i2cv1, because i2cv2 has additional complications: - Async methods still use a lot of busy waiting code in between DMA transfers, so simple `with_timeout()` will not work and it will have to use both types of timeouts. It could probably be rewritten to replace busy waits with IRQs, but that's outside the scope of this PR. - I2C definition `I2c<'d, T, TXDMA, RXDMA>` is different from i2cv1 `I2c<'d, T>` making it hard to share single `TimeoutI2c` wrapper. A couple of options here: - Duplicate `TimeoutI2c` code - Add dummy `TXDMA`, `RXDMA` types to i2cv1 considering that in the future it should also support DMA Co-authored-by: chemicstry <[email protected]>
| * | Add more docschemicstry2022-10-241-0/+3
| | |
| * | Unify i2cv1 definition with i2cv2chemicstry2022-10-241-1/+13
| | |
| * | Implement i2cv1 timeoutchemicstry2022-10-241-0/+30
| |/
* / stm32: Add support for read_until_idle on UARTGuillaume MICHEL2022-10-263-6/+17
|/
* Fix adc_v4 compilationchemicstry2022-10-071-1/+1
|
* Fix internal channel reading on adc_v2chemicstry2022-10-071-3/+22
|
* Remove flash lock/unlock public API from stm32 flash, and perform the ↵Mathias2022-09-301-1/+1
| | | | unlocking and locking automatically on erase and write operations
* Remove Forever, switch to static_cell.Dario Nieuwenhuis2022-08-221-7/+7
|
* Split embassy-time from embassy-executor.Dario Nieuwenhuis2022-08-1813-18/+18
|
* examples Remove the `fn config()` idiom.Dario Nieuwenhuis2022-08-172-13/+6
| | | | | It was only useful for doing #[embassy_executor::main(config = "config()")]`. Now that it's gone, it makes more sense to build the config in main directly.
* Remove HAL initialization from #[embassy::main] macro.Dario Nieuwenhuis2022-08-1712-26/+29
|
* Add DACv1 example for F4chemicstry2022-08-041-0/+37
|
* Split embassy crate into embassy-executor, embassy-util.Dario Nieuwenhuis2022-07-2912-32/+32
|
* rename PwmPin::new_chX, update examples.Dario Nieuwenhuis2022-07-231-2/+3
|
* Update embassy-stm32Dario Nieuwenhuis2022-07-231-3/+8
|
* Fix unused importschemicstry2022-07-141-1/+0
|
* Fix erasing across bankschemicstry2022-07-141-5/+3
|
* Fix writing to last sector of F4 flashchemicstry2022-07-141-10/+20
|
* Merge #858bors[bot]2022-07-112-5/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 858: embassy-stm32: Simplify time r=Dirbaio a=GrantM11235 - Remove unused `MilliSeconds`, `MicroSeconds`, and `NanoSeconds` types - Remove `Bps`, `KiloHertz`, and `MegaHertz` types that were only used for converting to `Hertz` - Replace all instances of `impl Into<Hertz>` with `Hertz` - Add `hz`, `khz`, and `mhz` methods to `Hertz`, as well as free function shortcuts - Remove `U32Ext` extension trait Co-authored-by: Grant Miller <[email protected]>
| * embassy-stm32: Simplify timeGrant Miller2022-07-102-5/+5
| | | | | | | | | | | | | | | | | | | | - Remove unused `MilliSeconds`, `MicroSeconds`, and `NanoSeconds` types - Remove `Bps`, `KiloHertz`, and `MegaHertz` types that were only used for converting to `Hertz` - Replace all instances of `impl Into<Hertz>` with `Hertz` - Add `hz`, `khz`, and `mhz` methods to `Hertz`, as well as free function shortcuts - Remove `U32Ext` extension trait
* | Add F4 flash driverchemicstry2022-07-111-0/+57
|/
* Use u32 instead of Duration for IWDGchemicstry2022-07-111-1/+1
|
* Add comments to watchdog examplechemicstry2022-07-101-0/+2
|
* Implement IWDG timeout calculationchemicstry2022-07-101-0/+44
|
* Merge #826bors[bot]2022-06-221-2/+2
|\ | | | | | | | | | | | | | | 826: Bump bxcan version r=chemicstry a=chemicstry Co-authored-by: chemicstry <[email protected]>
| * Fix examplechemicstry2022-06-231-2/+2
| |
* | Simplify examplechemicstry2022-06-231-10/+3
| |
* | Fix PWM for advanced timerschemicstry2022-06-231-0/+42
|/
* Run rustfmt.Dario Nieuwenhuis2022-06-1213-38/+18
|
* Add embassy-cortex-m crate.Dario Nieuwenhuis2022-06-121-2/+2
| | | | | | - Move Interrupt and InterruptExecutor from `embassy` to `embassy-cortex-m`. - Move Unborrow from `embassy` to `embassy-hal-common` (nothing in `embassy` requires it anymore) - Move PeripheralMutex from `embassy-hal-common` to `embassy-cortex-m`.
* common/PeripheralMutex: remove unsafe API. (#802)Dario Nieuwenhuis2022-06-091-2/+1
| | | | | | Following the project's decision that "leak unsafe" APIs are not marked as "unsafe", update PeripheralMutex to accept non-'static state without unsafe. Fixes #801
* Simplify examplechemicstry2022-05-261-5/+3
|
* Reimplement BufRead for BufferedUartchemicstry2022-05-261-0/+38
|
* Remove embassy_hal_common::usb.Dario Nieuwenhuis2022-05-042-213/+0
| | | | | | | | | | | 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.
* executor: fix unsoundness in InterruptExecutor::start.Dario Nieuwenhuis2022-04-251-6/+4
| | | | | | | 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.
* Use embassy/defmt-timestamp-uptime in all examples.Dario Nieuwenhuis2022-04-0215-56/+39
|
* Cleanupchemicstry2022-03-161-1/+2
|
* Fix SDMMC v2 and add H7 examplechemicstry2022-03-161-14/+9
|