aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* lpc176x: refactor usbserial to use udelay helper.Matt Baker2019-04-061-3/+1
| | | | Signed-off-by: Matt Baker <baker.matt.j@gmail.com>
* lpc176x: force minimum usb disconnect timeMatt Baker2019-04-063-0/+19
| | | | | | | Fixes GitHub Issue #1499. Resolves USB hang by forcing a minimum USB disconnection time at boot. Signed-off-by: Matt Baker <baker.matt.j@gmail.com>
* linux: add support for Linux hardware PWMJanne Grunau2019-04-056-4/+110
| | | | | | | | | | The replicape servo pins (P9_14/P9_16) are muxed to the SOCs hardware PWM unit driven by a 13MHz GP timer. They have to be driven by the linux host mcu. This commits adds hardware PWM support using the linux sysfs user space interface. Signed-off-by: Janne Grunau <janne-3d@jannau.net> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pwmcmds: allow 16-bit resolutionJanne Grunau2019-04-051-1/+1
| | | | | Signed-off-by: Janne Grunau <janne-3d@jannau.net> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Minor whitespace changes to sercom.cKevin O'Connor2019-04-041-3/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* linux: Convert SPI to use enumerationsKevin O'Connor2019-04-041-1/+10
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Use enumerations for buses and reserve pinsKevin O'Connor2019-04-044-7/+18
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Use enumerations for buses and reserve pinsKevin O'Connor2019-04-047-19/+29
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsam: Use enumerations for buses and reserve pinsKevin O'Connor2019-04-044-2/+35
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Use enumerations for buses and reserve pinsKevin O'Connor2019-04-044-7/+33
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bus: Change bus parameter in config_spi/config_i2cKevin O'Connor2019-04-042-3/+3
| | | | | | Be explicit when using an spi_bus vs i2c_bus in the parameter name. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Add enumerations for the atmega168/328 analog only pinsKevin O'Connor2019-03-311-0/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32f1: Fix ADC (#1474)smark-2019-03-311-1/+1
| | | | | The sampling time of the ADC was too slow (239 ADC clock cycles), causing the reading of the next ADC channel to have cross talk as per issue #1261. Sampling time updated to 41 ADC clock cycles. Signed-off-by: Marco D'Alessio <marco@wrecklab.com>
* pru: The TMR_CNT is cleared by writing all onesKevin O'Connor2019-03-311-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pru: Avoid using a timer wake time of exactly zeroKevin O'Connor2019-03-311-0/+2
| | | | | | | | It appears the PRU timer will not trigger on a match of exactly zero. If the next timer happened to be set to exactly zero, it could cause software timers to get stuck and result in "move queue empty" errors. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Explicitly disconnect USB on a bootloader requestKevin O'Connor2019-03-311-1/+7
| | | | | | | | | It appears some host machines may not recognize that the USB device has disconnected upon start of bootloader mode. Explicitly disable USB and add a 5ms delay to help signal the host of the upcoming change. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32f0: Wrong port definition for GPIOF (#1463)Eugene Krashtan2019-03-291-1/+1
| | | Signed-off-by: Eugene Krashtan <eug.krashtan@gmail.com>
* stm32f0: minor i2c bugfix (#1461)Eugene Krashtan2019-03-281-1/+1
| | | Signed-off-by: Eugene Krashtan <eug.krashtan@gmail.com>
* stm32f0: Various fixes according to comment: (#1453)Eugene Krashtan2019-03-286-121/+19
| | | | | | | | * Copyright in log.c * GPIO check completely removed * generic/timer_irq added * Change in doc section Signed-off-by: Eugene Krashtan <eug.krashtan@gmail.com>
* stm32f0: SPI and i2c interfaces addedEugene Krashtan2019-03-247-1/+274
| | | | Signed-off-by: Eugene Krashtan <eug.krashtan@gmail.com>
* stm32f0: New target STM32F0 added.Eugene Krashtan2019-03-2415-0/+1666
| | | | Signed-off-by: Eugene Krashtan <Eugene.Krashtan@opensynergy.com>
* stepper: Fix reset_step_clock corruption due to bitset typoKevin O'Connor2019-03-191-1/+1
| | | | | | | Commit b9b03dd0 had a typo in the flag updating. The typo could result in corruption of the stepper state. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* endstop: Use "pin_value" instead of "pin" when querying endstop stateKevin O'Connor2019-03-191-4/+4
| | | | | | | | | | Now that enumerations are available, any variable named "pin" can only be used to describe a gpio pin. Rename the end_stop_state "pin" parameter to "pin_value". Also, rename "end_stop_query" command to "end_stop_query_state" to notify users to upgrade both host and mcu code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* initial_pins: Add ability to configure output pins at mcu startupKevin O'Connor2019-03-174-1/+50
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* thermocouple: Define thermocouple types using enumerationsKevin O'Connor2019-03-171-6/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* linux: Use enumerations for pin mappingsKevin O'Connor2019-03-171-0/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pru: Use enumerations for pin mappingsKevin O'Connor2019-03-172-0/+7
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32f1: Use enumerations for pin mappingsKevin O'Connor2019-03-171-0/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Use enumerations for pin mappingsKevin O'Connor2019-03-171-0/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Use enumerations for pin mappingsKevin O'Connor2019-03-171-0/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsam: Use enumerations for pin mappingsKevin O'Connor2019-03-171-8/+21
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Use enumerations for pin mappingsKevin O'Connor2019-03-171-0/+18
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* msgproto: Convert static strings to a more generic enumeration systemKevin O'Connor2019-03-171-0/+7
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* command: Support evaluating C expressions in DECL_CONSTANT()Kevin O'Connor2019-03-172-11/+20
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* command: Always pass a string to the DECL_CONSTANT() macroKevin O'Connor2019-03-1728-32/+32
| | | | | | | | Make it clear that the name of the constant being defined is a string. When the value being defined is also a string, use a new DECL_CONSTANT_STR() macro. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Require an explicit reset_step_clock after stepper_stop()Kevin O'Connor2019-03-171-5/+9
| | | | | | | If the stepper is stopped by the endstop code, then ignore any further stepper moves until a reset_step_clock command is received. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* flash_usb: Run dfu-util via sudoKevin O'Connor2019-03-112-2/+2
| | | | | | | Default to running dfu-util via sudo as most machines will not have the user setup with permissions to access the raw usb device. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* flash_usb: Try to make the bossac atsam reboot logic more stableKevin O'Connor2019-03-101-1/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Support an optimized step/unstep function on ARMKevin O'Connor2019-03-103-32/+58
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32f1: Add support for entering the bootloader via USBKevin O'Connor2019-03-083-2/+17
| | | | | | | | | | | | Add support for entering the "stm32duino" bootloader via the arduino 1200 baud USB request. Add supprot for flashing over USB via the "make flash" command. Rename the existing "make flash" command to "make serialflash". Default to using a bootloader in Kconfig. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Add support to "make flash" to automatically enter the bootloaderKevin O'Connor2019-03-081-3/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsam: Improve support for flashing over USBKevin O'Connor2019-03-081-4/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Add support for flashing via "make flash"Kevin O'Connor2019-03-081-6/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Makefile: Reduce use of $^ in build rulesKevin O'Connor2019-03-025-9/+9
| | | | | | | It's rare to use all of a target's prerequisites in a recipe - replace most cases with $< (the target's first prerequisite). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Makefile: Fix lpc176x and stm32f1 buildsKevin O'Connor2019-03-022-15/+13
| | | | | | | | | Commit e18501d0 broke the build for targets that added objects to klipper.elf via adding dependencies. Rework the build so that it is possible to add objects to klipper.elf via a new OBJS_klipper.elf makefile variable. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Reduce memory for have_run_init in spi/i2cKevin O'Connor2019-03-012-6/+6
| | | | | | | Some of the samd21 chips have limited memory - change the code to reduce the size of global variables. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Add definitions for SAMD21E18 chipKevin O'Connor2019-03-012-2/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Implement custom memory allocation functionsKevin O'Connor2019-03-012-2/+17
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Use CONFIG_MCU in MakefileKevin O'Connor2019-03-011-6/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Use the full micro-controller name for CONFIG_MCUKevin O'Connor2019-03-011-5/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>