Skip to content

add encoder example for x035 - #937

Open
NyxCode wants to merge 2 commits into
cnlohr:masterfrom
NyxCode:encoder-example
Open

add encoder example for x035#937
NyxCode wants to merge 2 commits into
cnlohr:masterfrom
NyxCode:encoder-example

Conversation

@NyxCode

@NyxCode NyxCode commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

This PR adds an example for using a rotary encoder read by TIM1 or TIM2 on the x035. Like with the PD example, the functionality is in a generic rotary_encoder.h that can be copied into other projects.
This has not been fully tested yet, since i'm not working with an eval board with those pins exposed. If that's a problem, we can wait until I get one or someone else tests this.

@NyxCode

NyxCode commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

While toying with this, i noticed that some pins are not currently accessible on the X035, e.g. PB21, PB16, PB17, and PC19.

@cnlohr

cnlohr commented Jul 28, 2026

Copy link
Copy Markdown
Owner

@NyxCode this is shaped much more like the EVT code than I think I'm comfortable with. The examples should be a plain direction of how to use the peripheral, not have configuration structures.

@cnlohr

cnlohr commented Jul 28, 2026

Copy link
Copy Markdown
Owner

(This isn't a NO, but, it is not particularly the direction we want to take things with ch32fun)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants