aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* gpiocmds: Merge digital output and soft pwm codeKevin O'Connor2020-12-101-233/+119
| | | | | | | | The digital output commands implement a subset of the software pwm commands. Change the host code to just use the software pwm commands and simplify the micro-controller code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Only use the HSI48 clock when doing "usb clock recovery"Kevin O'Connor2020-12-081-1/+2
| | | | | | | | The HSI48 clock on the stm32f042 isn't as accurate as the main HSI clock. So, only use the HSI48 clock when using USB to synchronize that clock. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pca9685: Use move queue for pwm updatesKevin O'Connor2020-12-041-13/+58
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gpiocmds: Use move queue for software pwmKevin O'Connor2020-12-041-41/+78
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gpiocmds: Use move queue for digital output pinsPascal Pieper2020-12-041-11/+57
| | | | | Signed-off-by: Pascal Pieper <accounts@pascalpieper.de> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pwmcmds: Use move queue for hard PWMPascal Pieper2020-12-041-11/+56
| | | | | Signed-off-by: Pascal Pieper <accounts@pascalpieper.de> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Use a reusable interface to the "move queue"Kevin O'Connor2020-12-043-31/+81
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* basecmd: Change "move queue empty" error to "move queue overflow"Kevin O'Connor2020-12-041-1/+1
| | | | | | Use a more clear error message. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gpiocmds: Send soft pwm cycle_time separately from schedule_soft_pwm_outKevin O'Connor2020-12-041-11/+22
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pru: Disable gpio mux configuration codeKevin O'Connor2020-12-041-9/+19
| | | | | | | | The code isn't actually capable of altering the mux registers due to hardware checks enforced by the chip. Disable that code to save a few bytes in the final binary. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* neopixel: Fix neopixel_result message so that it contains an oidKevin O'Connor2020-11-051-1/+1
| | | | | | | In order for commit 82156170 to work properly, the neopixel_result message must contain the oid. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* command: Fix handling of buffer passing in args[] on 64bit mcuKevin O'Connor2020-10-304-0/+17
| | | | | | | | If the buffer pointer can't fit in a uint32_t then pass a relative buffer offset instead. This fixes buffer handling on 64bit linux mcus. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* command: Add command_decode_ptr() helperKevin O'Connor2020-10-3010-30/+38
| | | | | | | | Add a helper function to convert from a string buffer passed in the args[] parameter to an actual pointer. This avoids all the callers needing to perfrom pointer manipulation. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* neopixel: Increase the maximum LED chain lengthKevin O'Connor2020-10-291-15/+33
| | | | | | | Rework neopixel updates to use an mcu buffer so that more than 18 LEDs can be in a chain. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Support reading chip based temperature sensorKevin O'Connor2020-10-291-1/+15
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Support reading chip based temperature sensor on stm32f0Kevin O'Connor2020-10-291-2/+10
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Reduce adc_pins storage size in stm32f0_adc.cKevin O'Connor2020-10-291-19/+7
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Support reading chip based temperature sensor on stm32f1/2/4Kevin O'Connor2020-10-291-5/+24
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsam: Support reading chip based temperature sensor on sam4eKevin O'Connor2020-10-291-1/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsam: Support reading chip based temperature sensor on sam3/sam4sKevin O'Connor2020-10-291-5/+13
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* linux: Fix spi handling with more than one spi deviceKevin O'Connor2020-10-251-0/+1
| | | | | | Reported by @opensource-alt. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Don't default to HID bootloader in KconfigKevin O'Connor2020-10-131-6/+8
| | | | | | | Restore the default of an 8KiB bootloader for stm32f103 and a 32KiB bootloader for stm32f207/stm32f407. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Fixed CAN bus for STM32F4, there were syntax errors that prevented ↵bondus2020-10-111-3/+3
| | | | | | compilation Signed-off-by: Pontus Borg <liquidpontus@yahoo.se>
* gpiocmds: Add soft-pwm frequency modulation supportGuy Shapira2020-09-261-10/+9
| | | | | Signed-off-by: Guy Shapira <gayuha@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sensor_adxl345: Remove unused stop_time parameterKevin O'Connor2020-09-051-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* adxl345: Add support for adxl345 accelerometerKevin O'Connor2020-09-052-1/+180
| | | | | | | Add support for taking measurements from an adxl345 accelerometer via SPI interface. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* config: Added TronXY X5SA support (#3265)Cabia Rangris2020-08-301-0/+3
| | | | | | | Added printer-tronxy-x5sa-v6 config. Added "chitu" bootloader option to stm32 Kconfig. Added chitu_crypt. Signed-off-by: Vladimir Serov <me@cab404.ru>
* stm32: Improvements to CAN bus ID generation. And added a small fast hash ↵bondus2020-08-092-6/+7
| | | | | | | | library (#3165) Improved CAM bus ID generation, there were issues with ID collisions. Added a small fast hash library. Signed-off-by: Pontus Borg <liquidpontus@yahoo.se>
* linux: Set the SPI mode in spidev.cKevin O'Connor2020-07-311-0/+5
| | | | | | Fix omission causing the SPI mode to not be set on the linux mcu. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* linux: Disable hardware pwm when it is set to zeroKevin O'Connor2020-07-202-13/+12
| | | | | | | | | | | Only write "1" to the "enable" file when a non-zero pwm width is requested. Write "0" to the "enable" file when a zero pwm width is requested. This fixes a problem on the replicape servo lines that prevented them from being fully disabled. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Fix spi mode bitsKevin O'Connor2020-07-101-1/+1
| | | | | | | | The lpc176x hardware spi initialization code was swapping the CPOL and CPHA bits. This caused the MAX31865 and MAX31856 chips to not work correctly. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Improved CAN support for STM32 (#2976)bondus2020-06-247-279/+493
| | | | | | | | | Reworked the STM32F0 CAN bus implementation. It's more robust and higher performance. Added support for function remapping to different pins. API is emulating an STM32F0. Improved and ported CAN bus to STM32F0, F1 and F4. Signed-off-by: Pontus Borg <glpontus@gmail.com>
* stm32: Initial support for stm32f2 (#3001)combolek2020-06-234-6/+46
| | | | | | | Initial support for stm32f2 in general and STM32F207 in particular. Boots up and communicates on STM32F207VC. Signed-off-by: Boleslaw Ciesielski <combolek@users.noreply.github.com>
* stm32: Support for 20KiB bootloader offset. (#3008)kianusch2020-06-201-0/+3
| | | Signed-off-by: Kianusch Sayah Karadji <kianusch@gmail.com>
* generic: Minor header cleanup to generic/irq.hKevin O'Connor2020-06-071-2/+0
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* linux: Wait in timer dispatch for up to 2usKevin O'Connor2020-06-071-2/+2
| | | | | | | Use 2us in the linux timer dispatch code to unify linux timer dispatch logic with the common timer_irq.c code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* linux: Ability to use multiple GPIO chips (#2935)Lucio Tarantino2020-06-063-20/+48
| | | Signed-off-by: Lucio Tarantino <lucio.tarantino@gmail.com>
* Kconfig: Only show the "usb ids" menu if low-level options are enabledKevin O'Connor2020-05-311-7/+10
| | | | | | It's rare to customize the usb ids, so make it a "low-level" option. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Kconfig: Change the default usb vendor/product idKevin O'Connor2020-05-311-2/+2
| | | | | | | Change the product/vendor id to 0x1d50/0x614e, which has been reserved for Klipper (thanks to the openmoko project). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lcd_hd44780: Only calibrate cmd_wait_ticks on mcus with strict timingKevin O'Connor2020-05-311-0/+5
| | | | | | | The calibration isn't valid on the linux mcu, so make it dependent on CONFIG_HAVE_STRICT_TIMING. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lcd_st7920: Only calibrate wait ticks on mcus with strict timingKevin O'Connor2020-05-311-0/+6
| | | | | | | The calibration isn't valid on the linux mcu, so make it dependent on CONFIG_HAVE_STRICT_TIMING. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Make toggling the step gpio after timer read conditionalKevin O'Connor2020-05-311-1/+5
| | | | | | | On the Linux mcu, toggling the pin after the time is read is not valid. Make that optimization dependent on CONFIG_HAVE_STRICT_TIMING. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Kconfig: Add a new CONFIG_HAVE_STRICT_TIMING build definitionKevin O'Connor2020-05-317-0/+9
| | | | | | | | Add a new build definition to note micro-controllers that have strict timing. The Linux mcu code does not have strict timing - all other targets currently do. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Fix typo causing internal clock to always be used on stm32f042Kevin O'Connor2020-05-281-1/+1
| | | | | | Reported by Pontus Borg. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32f4: Add support for HID bootloaderArksine2020-05-282-2/+16
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* stm32f1: Add support for HID BootloaderArksine2020-05-283-4/+16
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* linux: userspace GPIO controlandryblack2020-05-179-22/+186
| | | | | | Allow use host GPIO pins for non-realtime purposes. Signed-off-by: Andrey Kunitsyn <blackicebox@gmail.com>
* stm32: add support for i2c readArksine2020-05-051-3/+39
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* htu21d: Support for HTI21D family sensor on I2C bus (#2803)Lucio Tarantino2020-05-031-1/+2
| | | Signed-off-by: Lucio Tarantino <lucio.tarantino@gmail.com>
* stm32: Wait for setup complete to enable ep0 rx in usbotg.cArksine2020-05-031-4/+11
| | | | | | | | Endpoint 0 OUT needs to NAK everything until the core signals that the setup stage is complete. Signed-off-by: Eric Callahan <arksine.code@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>