holgersson-overlay/dev-python/pifacecommon/files/pifacecommon-4.2.1-fix_speed.patch

20 lines
642 B
Diff
Raw Normal View History

Author: Nils Freydank <holgersson@posteo.de>
Date: Sat Apr 07 22:00:01 2018 +0100
Set speed_hz to a limited value as it might otherwise be default
to a system clock depending value.
--- a/pifacecommon/spi.py 2015-05-26 12:24:06.000000000 +0200
+++ b/pifacecommon/spi.py 2018-04-07 22:00:00.000000000 +0200
@@ -65,7 +65,8 @@
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(15000)
)
if self.spi_callback is not None: