Skip to content

Commit

Permalink
Set explicit SPI frequency to allow board to work in newer kernels wh…
Browse files Browse the repository at this point in the history
…ich has too high default frequency
  • Loading branch information
johan162 committed Nov 11, 2017
1 parent 546b0b1 commit d4c5689
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pifacecommon/spi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit d4c5689

Please sign in to comment.