-
Notifications
You must be signed in to change notification settings - Fork 870
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[stm32] [timer] [qei] allow configuration of pull-up/down internal re…
…sistors on QeiPin Refactor STM32 QEI to use Config struct to emulate UART peripheral and allow config of internal pull-up and -down, and enable setting encoder mode. Warn: Breaking API change So far as possible this is sympathetic to how I understood the UART module/peripheral. I kept things minimally configurable and future prood at the expense of a breaking API change by removing the QeiPin. I kept as much type discrimination code as I could, the specific generic traits about Channel1Pin and Channel2Pin from the timer parent module, and keeping owned references to the pins. I _removed_ some of the use of PhantomData as my naïve reading of the code leads me to believe it's not necessary now, and my breadboarded EC11 encoder toy works with all combinations of PU/PD and different counter modes. Thanks for taking the patch. boop
- Loading branch information
1 parent
9d94d68
commit 0e924f7
Showing
1 changed file
with
104 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters