Commit Graph

135 Commits (16272ef716a6faba298131e6df922b89d86e3427)

Author SHA1 Message Date
Dimitri Polonski 16272ef716 fix typo 3 years ago
Torkel Danielsson bd8c2758ee fix warning 3 years ago
Daniel Egger 6a576da322
Made I2C more resilient by handling more error conditions (#95)
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
3 years ago
Daniel Egger 91bb5d8418 Fix clippy lints
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
3 years ago
Daniel Egger f2986badc1 Ran rustfmt over all code
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
3 years ago
Daniel Egger 879e4e3c77 Simplify serial `read()` error handling
Clearing the error bits once should suffice

Signed-off-by: Daniel Egger <daniel@eggers-club.de>
3 years ago
Daniel Egger 590bbbd73e Optimize 8-bit SPI transfers and add 16-bit SPI transfers
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
3 years ago
Daniel Egger 0907de090d
Merge pull request #102 from stm32-rs/pac-instead-of-stm32
Soft-deprecate `stm32` for PAC access and use `pac` instead
3 years ago
Daniel Egger c4ad05524e Soft-deprecate `stm32` for PAC access and use `pac` instead
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
3 years ago
Daniel Egger ae29706781 Use core::convert::Infallible instead of void::Void for USARTs
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
3 years ago
Vadim Kaushan 154495b378
Replace volatile access with pac register read/write 3 years ago
Danilo Bargen 0e4998d2de Improve documentation for alternate function modes 3 years ago
Vadim Kaushan 407bd890c9
Fix pllsrc bits for HSE 3 years ago
Daniel Egger 53e6f73106 Assume twice the timer frequency when HCLK != PCLK
Internally the frequency going to the timers is doubled if PCLK is
prescaled.

Fixes #90

Signed-off-by: Daniel Egger <daniel@eggers-club.de>
3 years ago
James Munns b15fc1532f
Add I2C Read implementation (#88)
* Add read implementation
* Add changelog
3 years ago
Nathan Conrad d59291f414 Correct logic used to determine default PLL pre-divider. 3 years ago
Nathan Conrad b3988e768e RCC: USB source switching code. 3 years ago
Nathan Conrad 8bcf488582 RCC: Only provide HSI48 in API for devices which are documented to have it. 3 years ago
Daniel Egger 865dc15f53 Run through rustfmt
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
3 years ago
Daniel Egger 33fe6da6dc Fix STM32F030/STM32F070 impl
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
3 years ago
Daniel Egger 67e29bfa8b Bump stm32f0 version to 0.9 and upgrade code accordingly
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
3 years ago
Nathan Conrad 02278e5542 Add (breaking) API change to allow for HSE bypass to be selected. 3 years ago
Nathan Conrad 3ba20dc0cb RCC: PLL: Modify CR instead of write, plus remove unnecessary unsafe tag. 3 years ago
Vadim Kaushan 150063efa1
Mention the stm32-usbd feature 3 years ago
Vadim Kaushan f9ef8c3479
Enable USB support for STM32F070x6/B 3 years ago
Vadim Kaushan 86c7f95c0e
Add USB driver 3 years ago
Daniel Egger 9cf30e9961
Merge pull request #73 from stm32-rs/gpios-in-one
Improve legibility by having a single macro structure for all pins
3 years ago
Daniel Egger 143f6b2bf8 Clear error flags before returning
Closes #61

Signed-off-by: Daniel Egger <daniel@eggers-club.de>
3 years ago
Daniel Egger 9f933af6a2 Improve legibility by having a single macro structure for all pins
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
3 years ago
Daniel Egger 1e649bbc0b Fix a number of clippy warnings
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
3 years ago
Mike Panetta 4c3504c8e1 Add dac (#70)
* Added dac.rs from stm32g4xx-hal crate and modified it a bit.

* Removed IDE files.

* Fix feature gating for DAC module.

* Remove unused calibrate function from DacPin trait.

* Add feature gates for all devices that support DAC.

* Added docs and example.

* Some cleanup, fixed feature gate.
3 years ago
Daniel Egger 7e345c6b4c Changed implementation to implement digital v2 interface
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
4 years ago
Daniel Egger 2116717507 Fixed a number of deprecation warnings and lints
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
4 years ago
Daniel Egger ff1cea2829 Enable commented out GPIOE support which now works
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
4 years ago
Daniel Egger 9a1ba72ed1 Extract the GPIO RegisterBlock address only once per function call
This improves code clarity and slightly reduces dev mode build sizes

Signed-off-by: Daniel Egger <daniel@eggers-club.de>
4 years ago
Daniel Egger cf4de96aee Clear UART errors after we've detected and reported them
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
4 years ago
Daniel Egger aec4e470d9 Added #inline(always) attributes to gpio functions
This has a positive effect on dev build sizes

Signed-off-by: Daniel Egger <daniel@eggers-club.de>
4 years ago
Daniel Egger 89d2d6f07b Enable CRS support for USB
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
4 years ago
Matous Hybl 4714c70d18 Remove STM32F030 from devices that have I2C1 available on pins PA11 and PA12. 4 years ago
David Turner be7084cbbe Fix typo in SPI example 4 years ago
Daniel Egger 1e040f403b Implement TSC (touch sensitive controller) support
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
4 years ago
Daniel Egger 2f0fb0b09e Use modify instead of write for HSI14 clock setup
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
4 years ago
Daniel Egger 77a6dad00a Improved serial write_str implementation to properly handle errors
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
4 years ago
HarkonenBade e081e82390 Update the ADC code to take advantage of the named variants in stm32-rs v0.6.0 4 years ago
Tom 1524cb1967 Update to stm32f0 - 0.6.0 (#52)
* Updated stm32f0 to 0.6.0 and neatened other deps

* Adjusted names and removed unneeded unsafe blocks

* Overhauled RCC to gate HSI48 correctly and add a selector function for it to CFGR
4 years ago
Jesse Braham 63bbfd3068 Review all device datasheets and fix inconsistencies 4 years ago
Jesse Braham e3d7111c08 Fix some long-standing errors and inconsistencies for USARTS 4 years ago
Jesse Braham 32b14bf976 Add support for stm32f098 4 years ago
Jesse Braham fca47168d2 Add support for stm32f078 4 years ago
Jesse Braham c79c69c0f3 Add support for stm32f058 4 years ago