From ebd9035325fc3f4ca8e40b06804f3834bbea5a28 Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Sun, 8 Jul 2018 00:03:00 +0200 Subject: SPI: introduce spi_prepare function 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 --- src/linux/spidev.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/linux/spidev.c') diff --git a/src/linux/spidev.c b/src/linux/spidev.c index cb511205..2d6f55ac 100644 --- a/src/linux/spidev.c +++ b/src/linux/spidev.c @@ -56,6 +56,11 @@ spi_setup(uint32_t bus, uint8_t mode, uint32_t rate) return (struct spi_config) { fd }; } +void +spi_prepare(struct spi_config config) +{ +} + void spi_transfer(struct spi_config config, uint8_t receive_data , uint8_t len, uint8_t *data) -- cgit v1.2.3-70-g09d2