-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Son 2159 support C pins #2
Conversation
430: fix vscode rust-analazer r=richardeoin a=burrbull Co-authored-by: Andrey Zgarbul <[email protected]>
replace bors with merge queue
Added VOS0 support for stm32h7a3/7b3/7b0
update GPIO 2
Reorder [[example]] targets alphabetically Remove some unnessesary required features Tidy documentation in sai_dma_passthru example
Changes to be committed: modified: Cargo.toml new file: examples/blinky-stm32h747i-disco.rs by Youndong ([email protected])
check code formatting
…Update DSI examples.
…ify examples run commands. Reformat.
Add new blinky example using GPIOs on STM32H747i-Disco
MIPI DSI Display HAL
rust/#114447 made `&mut MY_STATIC_MUT` a warning, with the intention of disallowing it entirely in the 2024 edition. We never used this in the crate itself, but it is used in many examples. This commit removes these references from the examples. In general the new approach is to change `static mut` of type `X` to type `MaybeUninit<X>`. These can then cleanly be accessed with [`MY_STATIC_MUT.write()`](https://doc.rust-lang.org/core/mem/union.MaybeUninit.html#method.write) followed by [`MY_STATIC_MUT.assume_init_mut()`](https://doc.rust-lang.org/core/mem/union.MaybeUninit.html#method.assume_init_mut). Where we need to cast a `MaybeUninit<[X; N]>` to a `[MaybeUninit<X>; N]` in order to initialise it element-by-element, the `&mut *ptr::addr_of_mut!(MY_STATIC_MUT)` construction is still used. After initialisation, we can then access it with `MY_STATIC_MUT.assume_init_mut()`. In a few DMA Examples we were taking a reference `&mut TARGET_BUFFER` without initialising TARGET_BUFFER. This commit changes this to `TARGET_BUFFER.assume_init_mut()` *without* initialising `TARGET_BUFFER`. This was and remains UB. * USB Examples: `static mut EP_MEMORY` now has type `MaybeUninit<[u32; 1024]>` * Ethernet Examples: `static mut DES_RING` now has type `MaybeUninit<ethernet::DesRing<4, 4>>`
Also remove extra "proto-ipv6" feature that is not needed by examples
`TryFrom` and `TryInto` part of the prelude [since the 2021 edition](https://doc.rust-lang.org/edition-guide/rust-2021/prelude.html). stm32-rs#236
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIce!
I assume the merged STM changes are OK, did not review them.
src/adc.rs
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
@@ -64,6 +64,10 @@ | |||
use core::marker::PhantomData; | |||
|
|||
use crate::rcc::ResetEnable; | |||
// EB: Todo: If making PR upstream, this should only be include for some boards (see pwr.rs) | |||
use crate::stm32::SYSCFG; | |||
// EB: Todo: If making PR upstream, check which boards has relevant Pxy_C pins and update |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this involves going through the data sheets for all the supported MCUs (there are at least 13) and the package information for each of those (probably 3-5 for each MCU) to see which have these pins (and then add feature flags in the right places), so it is a rather big undertaking...
65edd72
to
6f13b8f
Compare
No description provided.