aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/pins.py
Commit message (Collapse)AuthorAgeFilesLines
* 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>