aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* endstop: Rename mcu end_stop commands to endstopKevin O'Connor2019-07-121-35/+35
| | | | | | | | | Rename the commands. The main reason for this change is to force a micro-controller code updated (due to important bugfix in 7fefe52d). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Don't update SF_LAST_DIR if SF_NEED_RESETKevin O'Connor2019-07-121-1/+3
| | | | | | | | If the move is not added to the move queue, then the SF_LAST_DIR setting must not be changed. Otherwise, it could result in an incorrect direction being set on the stepper after a homing operation. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Reset LPC_UART0->FDR when using serialKevin O'Connor2019-07-101-0/+1
| | | | | | | | | | The popular "LPC17xx-DFU-Bootloader" alters the LPC_UART0->FDR register, so be sure to reset it back to its default when using serial in Klipper. Reported by @b-vs. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* buttons: initialize mcu buttons based on inverted stateArksine2019-07-051-2/+3
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* lpc176x: Add more filtering to workaround adc hardware defectKevin O'Connor2019-06-201-1/+11
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Fix adc clock divisorKevin O'Connor2019-06-191-2/+2
| | | | | | | | Commit 1096075d changed CONFIG_CLOCK_FREQ to the actual cpu frequency, but that commit failed to update adc.c accordingly. That made the adc run 4 times slower. Make the corresponding change to adc.c. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* armcm_timer: Unify udelay() implementationKevin O'Connor2019-06-0910-42/+24
| | | | | | | Move the udelay() code from various arm board directories into the src/generic/armcm_timer.c code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsam: Add support for "timer" controlled hardware pwm pinsKevin O'Connor2019-06-022-8/+145
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Add build support for SAMD21E15 chipKevin O'Connor2019-06-011-0/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Reduce the compile size of the hard_pwm pin listKevin O'Connor2019-05-301-28/+35
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gpiocmds: Specify soft pwm duration in clock ticksKevin O'Connor2019-05-261-12/+6
| | | | | | | | Improve the precision of soft pwm pulses by allowing the host to directly specify the clock duration of the pulse. This improvement in precision may be noticeable when controller servos (and bltouch). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32f1: Add support for building with a 0x7000 code offsetKevin O'Connor2019-05-231-0/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsam: Enable pullup on i2c SDA lineKevin O'Connor2019-05-231-4/+4
| | | | | | The internal pullup helps ensure i2c errors are detected properly. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsam: Improve i2c timeout detectionKevin O'Connor2019-05-231-15/+10
| | | | | | Unify timeout detection in i2c_write() and i2c_read(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsam: Minor whitespace changes to i2c.cKevin O'Connor2019-05-231-27/+18
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* spi_software: Minor simplification to spi_software_prepare()Kevin O'Connor2019-05-221-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Simplify spi mode settingKevin O'Connor2019-05-071-22/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* spi_software: save mode setting in config structure.Matt Baker2019-05-071-0/+1
| | | | Signed-off-by: Matt Baker <baker.matt.j@gmail.com>
* 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>