aboutsummaryrefslogtreecommitdiffstats
path: root/src/stm32f1/gpio.h
Commit message (Collapse)AuthorAgeFilesLines
* stm32f1: Remove now unused src/stm32f1/ directoryKevin O'Connor2019-08-051-43/+0
| | | | | | | Now that the stm32f1 code has been merged into the stm32 code, there is no longer a need to keep the stm32f1/ directory. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32f1: It's only necessary to program the CR1 register during SPI initKevin O'Connor2019-01-071-1/+1
| | | | | | Only set the CR1 register during spi_prepare(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32f1: Add support for gpio_x_reset()Kevin O'Connor2018-08-271-0/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* SPI: introduce spi_prepare functionGrigori Goronzy2018-07-081-0/+1
| | | | | | | | | | | | | | | | The SPI interface needs to be enabled and configured to the correct settings of a given oid before CS is asserted. The new function spi_prepare() allows ports to do that. This port only introduces the new function in all ports with no implementation and adds the call to the Klipper generic firmware code. That means everything still works as before. Ports need to be changed to fix the underlying issue. Discussion about the motivation here: https://github.com/KevinOConnor/klipper/pull/453#issuecomment-403131149 Signed-off-by: Grigori Goronzy <greg@chown.ath.cx>
* stm32f1: add SPI supportGrigori Goronzy2018-07-071-0/+7
| | | | | | | | | Add basic SPI support and associated documentation. v2: remove baud rate check, fix baud rate calculations v3: finish transaction with BSY check, disable SPI when not in use Signed-off-by: Grigori Goronzy <greg@chown.ath.cx>
* stepper: Introduce and use gpio_out_toggle_noirq()Kevin O'Connor2018-05-151-0/+1
| | | | | | | | | | | | | | | The gpio_out_toggle() function in the sam3x8e and stm32f1 code was only valid if it was called with irqs disabled. Commits 018c5daa and 9c52ad43 enabled the lcd code which called gpio_out_toggle() with irqs enabled. This could cause corruption of the gpio state. Introduce a gpio_out_toggle_noirq() function that will only be invoked with irqs disabled, and fix gpio_out_toggle() on sam3x8e and stm32f1 so that it safe to call even if irqs are enabled. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Add STM32F103 portGrigori Goronzy2018-04-091-0/+32
Add a fully functional STM32F1 port, currently mostly targeting STM32F103 microcontrollers. This requires an 8 MHz XTAL. The maximum possible step rate is around 282K steps per second. This uses stm32flash to burn the firmware. The bootloader needs to be started by setting BOOT0 to 1 and resetting the MCU. There is no automatic bootloader, unlike on Arduino. Signed-off-by: Grigori Goronzy <greg@kinoho.net>