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