aboutsummaryrefslogtreecommitdiffstats
path: root/src/avr/gpio.h
Commit message (Collapse)AuthorAgeFilesLines
* avr: Add support for sending I2C messagesKevin O'Connor2018-11-231-0/+9
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: 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>
* 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>
* spicmds: Rework SPI message transmissionKevin O'Connor2018-05-071-2/+6
| | | | | | | | | Improve the SPI message transmit system. Add support for bus speed and bus mode. Add support for sending SPI messages on shutdown. Signed-off-by: Petri Honkala <cruwaller@gmail.com> Signed-off-by: Douglas Hammond <wizhippo@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gpio: Merge gpio_adc_sample_time() into gpio_adc_sample()Kevin O'Connor2016-11-021-4/+2
| | | | | | | Return the number of clock ticks to wait directly from gpio_adc_sample(). This simplifies the ADC interface. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Initial commit of source code.Kevin O'Connor2016-05-251-0/+42
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>