Skip to content
This repository was archived by the owner on Sep 30, 2019. It is now read-only.

Commit 6532a0e

Browse files
committed
Explicitly set SPI mode to 0 by default.
1 parent ca81084 commit 6532a0e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Adafruit_GPIO/SPI.py

+2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ def __init__(self, port, device, max_speed_hz=500000):
4242
self._device = spidev.SpiDev()
4343
self._device.open(port, device)
4444
self._device.max_speed_hz=max_speed_hz
45+
# Default to mode 0.
46+
self._device.mode = 0
4547

4648
def set_clock_hz(self, hz):
4749
"""Set the speed of the SPI clock in hertz. Note that not all speeds

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from setuptools import setup, find_packages
44

55
setup(name = 'Adafruit_GPIO',
6-
version = '0.2.0',
6+
version = '0.3.0',
77
author = 'Tony DiCola',
88
author_email = 'tdicola@adafruit.com',
99
description = 'Library to provide a cross-platform GPIO interface on the Raspberry Pi and Beaglebone Black using the RPi.GPIO and Adafruit_BBIO libraries.',

0 commit comments

Comments
 (0)