aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/pins.py
Commit message (Collapse)AuthorAgeFilesLines
* klippy: No need to pass printer reference to add_printer_objects()Kevin O'Connor2018-07-121-2/+2
| | | | | | The config reference already stores a reference to the printer object. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* buttons: Add initial support for detecting button pressesKevin O'Connor2018-06-301-2/+3
| | | | | | | 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>
* pins: Strip pin names before trying to parse themKevin O'Connor2018-06-301-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Add support for GPIO pinsKevin O'Connor2018-05-251-0/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Add STM32F103 portGrigori Goronzy2018-04-091-0/+1
| | | | | | | | | | | | Add a fully functional STM32F1 port, currently mostly targeting STM32F103 microcontrollers. This requires an 8 MHz XTAL. The maximum possible step rate is around 282K steps per second. This uses stm32flash to burn the firmware. The bootloader needs to be started by setting BOOT0 to 1 and resetting the MCU. There is no automatic bootloader, unlike on Arduino. Signed-off-by: Grigori Goronzy <greg@kinoho.net>
* pins: Remove module level get_printer_pins() and setup_pin() functionsKevin O'Connor2018-04-041-6/+0
| | | | | | | | Most callers did a lookup of the pins module via printer.lookup_object("pins"). Use that as the standard method and remove these less frequently used methods. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Add at90usb646 supportDouglas Hammond2018-02-251-1/+1
| | | | Signed-off-by: Douglas Hammond wizhippo@gmail.com
* pins: Warn on invalid pin formatKevin O'Connor2018-02-071-7/+17
| | | | | | Raise an error if a pin description isn't formatted correctly. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Add access methods and avoid peeking into the printer classesKevin O'Connor2018-01-281-1/+1
| | | | | | | | | Add get_reactor(), lookup_object(), lookup_module_objects(), and set_rollover_info() to the main Printer class so that callers do not need to peek into the class' members. Similarly, add get_printer() and get_name() methods to the ConfigWrapper class. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pins: Check if the same pin is referenced via different aliasesKevin O'Connor2018-01-101-14/+25
| | | | | | | | Change the update_command() call to use a new PinResolver class. In that new class, verify that the same pin isn't referenced in two different parts of the config using different aliases for the pin. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Automatically detect and handle shared stepper enable linesKevin O'Connor2018-01-101-4/+16
| | | | | | | | | | | It's common for multiple steppers to use the same stepper enable line. Detect this and only create a single digital_out oid on the micro-controller. Also, prohibit any other pin from being used multiple times in the config file. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pins: Rename parse_pin_desc() to lookup_pin()Kevin O'Connor2018-01-101-9/+9
| | | | | | | Always set the pin_params['type'] field on a pin lookup. Rename parse_pin_desc() to lookup_pin() to make the change more clear. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pins: Fix atmega168/328 mappingsKevin O'Connor2017-12-091-1/+2
| | | | | | | | | The atmega168 and atmega328 need to define PE0 and PE1 in order to support the 2 extra analog pins. Also, support the arduino mappings for the atmega328. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pins: Add pin mapping for atmega1284pKevin O'Connor2017-10-051-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* linux: Add support for analog IIO devicesKevin O'Connor2017-09-201-0/+1
| | | | | | | | Add support for reading analog values via the standard Linux IIO interface. This can be used on Replicape boards to sample analog input pins. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pins: Don't pass mcu_freq to update_command()Kevin O'Connor2017-09-131-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Drop support for TICKS() expansion in mcu config commandsKevin O'Connor2017-08-261-5/+2
| | | | | | | It's no longer necessary to use the TICKS() hack as the config commands are now all generated after the mcu speed is known. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pins: Support registering arbitrary chips that supply configurable pinsKevin O'Connor2017-08-251-3/+56
| | | | | | | | | Allow multiple chips to provide pin mappings (not just the main mcu chip). Move the pin parsing from the mcu.py code to pins.py and support mapping from pin descriptions to their corresponding chips and parameters. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pins: Fix typo in at90usb1286 support so PF0-7 pins are definedKevin O'Connor2017-06-091-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Add support for atmega328 chipKevin O'Connor2017-05-281-2/+2
| | | | | | | | The atmega328 is basically the same as the atmega168 - it just adds some additional memory. Allow the chip to be selected during the build. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pru: Add support for ADC inputKevin O'Connor2017-05-171-1/+9
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pins: Add pin mappings for Beaglebone boardsKevin O'Connor2017-05-151-6/+52
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Support config mechanism for translating seconds to clock ticksKevin O'Connor2017-03-131-4/+7
| | | | | | | Introduce a TICKS() macro during config parsing that will translate time in seconds to time in clock ticks. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pins: Simplify pin map alias setupKevin O'Connor2017-03-131-16/+17
| | | | | | | | Use map_pins() to obtain the pin mapping - don't export mcu_to_pins(). The functionality of mcu_to_pins() can be obtained by calling map_pins() with name=None. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pins: Add Arduino Due pin name aliasesKevin O'Connor2016-06-141-0/+17
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sam3x8e: Add initial support for Arduino Due boardsKevin O'Connor2016-06-141-6/+7
| | | | | | | This adds basic support for running on the Atmel SAM3x8e micro-controllers that are found in the Arudino Due boards. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Initial support for Atmel AT90USB1286 mcuKevin O'Connor2016-06-051-0/+1
| | | | | | | Add GPIO definitions for the AT90USB1286. Add code for communicating over USB port on AT90USB1286. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Initial commit of source code.Kevin O'Connor2016-05-251-0/+88
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>