aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/buttons.py
Commit message (Collapse)AuthorAgeFilesLines
* mcu: Rename add_config_object() to register_config_callback()Kevin O'Connor2018-09-031-1/+1
| | | | | | | | | Change the name of the config registration method and pass an explicit reference to the callback to the new method. This makes the relationship between mcu registration and build_config() more clear in the calling code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pins: Explicitly pass can_invert and can_pullup to lookup_pin()Kevin O'Connor2018-07-261-1/+1
| | | | | | | | | | | | Don't pass pin_type to lookup_pin() - instead, if a pin can be inverted or can have a pullup, then the caller must explicitly specify that when calling lookup_pin(). This simplifies the code for the cases where it is not valid to invert or pullup. Explicitly pass the pin_type to setup_pin() and have ppins.setup_pin() apply default pullup and invert flags. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* buttons: Improve rotary encoder handler by using Ben Buxton state machine. ↵Janar Sööt2018-07-011-11/+35
| | | | | | | (#445) https://github.com/brianlow/Rotary Signed-off-by: Janar Sööt <janar.soot@gmail.com>
* buttons: Add initial support for detecting button pressesKevin O'Connor2018-06-301-0/+143
Add mcu support for periodically polling for a button press. Add host code support for registering buttons and invoking callbacks for them. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>