esp-hal icon indicating copy to clipboard operation
esp-hal copied to clipboard

PCNT: Rename `set_input_mode` to `set_edge_mode`

Open Luro02 opened this issue 2 weeks ago • 1 comments

From the example:

ch0.set_ctrl_signal(input_a.clone());
ch0.set_edge_signal(input_b.clone());
ch0.set_ctrl_mode(channel::CtrlMode::Reverse, channel::CtrlMode::Keep);
ch0.set_input_mode(channel::EdgeMode::Increment, channel::EdgeMode::Decrement);

In the code it calls set_edge_signal to set the edge pin, but when setting the edge mode, it is called set_input_mode?

I think it would be better to rename it to set_edge_mode to be consistent.

Luro02 avatar Dec 08 '25 06:12 Luro02

As this code isn't consistent with our API guidelines anyway, I'm not sure we should spend time on just renaming the function.

bugadani avatar Dec 08 '25 06:12 bugadani