Make sure whitespace isn't in the pin description. Also make sure an
alias doesn't map to an invalid pin.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The atmega328pb has officially named these pins as PE2 and PE3, so use
that naming scheme instead of the previous Klipper invented names.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The atmega328p is basically the same as the atmega328 - add explicit
support for it so that avrdude doesn't complain while flashing.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This can be flashed to e.g. the duet wifi using bossac. It requires a
later version as is currently included in the klipper repo (1.8
vs. 1.2). Comms are currently via UART0 only, USB serial is still TBD
Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>