From b54d84e60944ab5dcfe565000fed6063c5f8ac31 Mon Sep 17 00:00:00 2001 From: Daniel Chesters Date: Wed, 1 Nov 2017 15:13:55 +0100 Subject: [PATCH] Fix for support the raspberrypi kernel change on spi-max-frequency (see raspberrypi/linux#2165 and piface/pifacecad/issues/24#issuecomment-340642247) since kernel 4.9.43 --- pifacecommon/spi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pifacecommon/spi.py b/pifacecommon/spi.py index 2aa5cfb..776ea99 100644 --- a/pifacecommon/spi.py +++ b/pifacecommon/spi.py @@ -65,7 +65,8 @@ def spisend(self, bytes_to_send): transfer = spi_ioc_transfer( tx_buf=ctypes.addressof(wbuffer), rx_buf=ctypes.addressof(rbuffer), - len=ctypes.sizeof(wbuffer) + len=ctypes.sizeof(wbuffer), + speed_hz=ctypes.c_uint32(100000) ) if self.spi_callback is not None: