-
Notifications
You must be signed in to change notification settings - Fork 213
Closed
Description
There will be 2 benifit of it.
- When users call
.set_count()
onQei
setup, underlying TIMCNT
can have value like0x8_000
(for 16bit TIM) or8_000_000
(for 32bit TIM), thus greatly avoid TIM underflow. CurrentlyCNT
of TIM set to0
at begining, if user try decrease count, thenCNT
will read as(2^16) - x
or(2^32) - x
. - Some Rotary Encoders use its shaft as a push button. When it pushed, we can use
.set_count()
clear/setCNT
value. (eg. a volume thumbwheel to set volume to default).
I do a #677 , but there seems some weird problems. I guess the unsafe {}
may related to PAC crate?
Don't know if it's a good idea to make a PR with this code quality.
Anyway, I make a PR.
Metadata
Metadata
Assignees
Labels
No labels