Skip to content

Change pins in qei.rs example #757

Answered by burrbull
franckinux asked this question in Q&A
Discussion options

You must be logged in to vote

The issue with PB3 it is already in AlternateMode, but different then needed. Configured for JTAG.

let rotary_encoder_pins = (gpioa.pa0, gpiob.pb3.into_alternate());

This is because From trait is not implemented for conversion between alternate modes due to conflict with implementation of From<Self>.
Alternative solution is to use custom trait instead of From.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@franckinux
Comment options

Answer selected by franckinux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants