Open JoseGuilhermeCR opened 1 year ago
I got rid of the error by using None::<gpio::Pin<'E', 3, Alternate<6>>>
, but it's definitely ugly... Still think there might be a way where I don't need to concern myself over the port/pin/mode of something I won't use.
https://github.com/stm32-rs/stm32h7xx-hal/pull/431 does not change Sai interface, but also support pins in Default (Analog
) mode to be passed in constructor.
So this also should work:
let sai1_pins = (
mclk_a_pin,
sck_a_pin,
fs_a_pin,
sd_a_pin,
None::<gpio::PE3>
);
Hi there,
I'm trying to use the SAI peripheral on an H735... But I'm stuck as I don't have an SdB pin and using
None
on the tuple will lead torustc E0282
andrustc E0283
.The compiler says I should say what Option none belongs to... So I thought something like this would work, but now I've got another compiler error,
rustc E0277
.The SAI example available in the
examples
directory uses SdB pin... but it's not shown anywhere howNone
should be used in the case you don't have this pin.The log of the first error is as follows:
Now I'm definitely not an expert in the language, I've only used it for a few years now, but not professionally nor with this heavy usage of templates and etc... Am I missing something really stupid?