aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* stm32: Adding support for STM32F031x6 (#3871)Elias Bakken2021-02-033-7/+22
| | | | | | | Add support for alt usart 1 Do not select all functions on 16 K mcu Signed-off-by: Elias Bakken <elias@iagent.no>
* canbus: Move high-level CAN code to new src/generic/canbus.cKevin O'Connor2021-02-026-192/+323
| | | | | | | | | | Separate out the high-level command processing logic from the low-level transmission code. Place the high-level code in src/generic/canbus.c . This also removes the CAN dependency on serial_irq.c . Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Simplify can.c irq handlerKevin O'Connor2021-02-021-127/+130
| | | | | | | Don't perform any heavy tasks in the CAN interrupt handler - just notify a background task to handle anything pending. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Use CAN_TSR_CODE to select next tx fifo in can.cKevin O'Connor2021-02-021-6/+2
| | | | | | | | | | The spec states that the TX fifo is transmitted in chronological order if the TXFP bit is set, but it's unclear if the software needs to fill the tx fifo in a particular order to obtain that result. Use the TSR CODE bit field to fill the TX fifo in the order that the hardware reports as next. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Avoid read+write modify instructions in can.cKevin O'Connor2021-02-021-24/+13
| | | | | | | | | Prefer explicitly setting the hardware registers and avoid using C read and modify instructions where possible. This avoids race conditions where an interrupt or hardware change could cause subtle corruption of the register state. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Introduce new can_set_filter() helper function in can.cKevin O'Connor2021-02-021-40/+32
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Update can.c to use more consistent indentationKevin O'Connor2021-02-021-146/+143
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* ds18b20: new module for 1-wire temperature sensor (#3462)Alan Lord2021-02-022-1/+276
| | | | | | | | | Initial commit of code to support 1-wire (Dallas) sensors such as the DS18B20. Requires Linux kernel drivers to create a file in /sysfs which is read by this module, and temperature typically returned to a temperature_fan. Signed-off-by: Alan Lord <alanslists@gmail.com> Signed-off-by: Josh Headapohl <joshhead@gmail.com>
* atsamd: Fix bug in sercom_pads mapping on samd21 in sercom.cKevin O'Connor2021-02-011-1/+1
| | | | | | Reported by @tech2077. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Support for STM32F401 (#3853)smark-2021-01-313-9/+17
| | | | | This module adds support for the STM32F401 microcontrollers Signed-off-by: Marco D'Alessio <marco@wrecklab.com>
* stm32f1: Fix for using 16MHz external crystal (#3814)Matt Shepcar2021-01-241-2/+7
| | | Signed-off-by: Matt Shepcar <matt@shepcar.co.uk>
* stm32: Support setting the stm32f0 internal clock trim valueKevin O'Connor2021-01-182-1/+11
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Add support for spi4 bus on stm32f446 chipKevin O'Connor2021-01-041-0/+7
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* 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>