aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32f4
Commit message (Collapse)AuthorAgeFilesLines
...
* 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-182-1/+174
|
* stm32 otg: add examples.chemicstry2023-01-112-2/+109
|
* Bump defmt-rtt to 0.4Dario Nieuwenhuis2022-11-291-1/+1
|
* Switch to async-fn-in-traitDario Nieuwenhuis2022-11-251-1/+1
|
* 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
| |
* | Update Rust nightly.Dario Nieuwenhuis2022-10-261-1/+1
|/
* Merge #1004bors[bot]2022-10-101-3/+22
|\ | | | | | | | | | | | | | | | | | | 1004: Fix internal channels for adc v2 r=lulf a=chemicstry Internal channel reading was broken on adc_v2, because `Adc::read()` requires gpio pin trait, which was not implemented by `VrefInt`, `Temperature`, `Vbat`. The required configuration bits `tsvrefe`, `vbate` were not enabled either. This PR makes it a bit closer to how adc_v4 works. While at it, I also changed adc_v2 to use `RccPeripheral` instead of permanently enabling all ADCs. Co-authored-by: chemicstry <[email protected]>
| * Fix adc_v4 compilationchemicstry2022-10-071-1/+1
| |
| * Fix internal channel reading on adc_v2chemicstry2022-10-071-3/+22
| |
* | all Cargo.toml: Add license to all crate Cargo.toml fileschrysn2022-10-071-0/+1
|/ | | | Closes: https://github.com/embassy-rs/embassy/issues/1002
* 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
* time: add more tick rates, use 1mhz as default.Dario Nieuwenhuis2022-09-021-1/+1
|
* split `embassy-util` into `embassy-futures`, `embassy-sync`.Dario Nieuwenhuis2022-08-221-1/+1
|
* Remove Forever, switch to static_cell.Dario Nieuwenhuis2022-08-222-7/+8
|
* Split embassy-time from embassy-executor.Dario Nieuwenhuis2022-08-1814-19/+20
|
* 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
|
* Update to critical-section 1.0, atomic-polyfill 1.0Dario Nieuwenhuis2022-08-171-1/+1
|
* Add DACv1 example for F4chemicstry2022-08-042-0/+38
|
* Split embassy crate into embassy-executor, embassy-util.Dario Nieuwenhuis2022-07-2913-33/+34
|
* 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-112-0/+58
|/
* 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
|/
* Merge pull request #822 from embassy-rs/remove-authorsDario Nieuwenhuis2022-06-181-1/+0
|\ | | | | Remove the authors field from Cargo.tomls
| * Remove the authors field from Cargo.tomlsDario Nieuwenhuis2022-06-181-1/+0
| | | | | | | | | | | | | | | | | | | | | | It currently contains whoever was first to write some code for the crate, even if many more people have contributed to it later. The field is "sort of" deprecated, it was made optional recently: https://rust-lang.github.io/rfcs/3052-optional-authors-field.html Due the the reasons listed there I believe removing it is better than setting it to generic fluff like "The Embassy contributors".
* | Merge pull request #821 from embassy-rs/defmt-traceDario Nieuwenhuis2022-06-181-0/+3
|\ \ | |/ |/| Add env DEFMT_LOG=trace to all examples.
| * Add env DEFMT_LOG=trace to all examples.Dario Nieuwenhuis2022-06-181-0/+3
| |
* | Update to 2021 edition. (#820)Dario Nieuwenhuis2022-06-181-2/+1
|/
* Run rustfmt.Dario Nieuwenhuis2022-06-1213-38/+18
|