Skip to content

Commit 8acb619

Browse files
committed
add more future for spi
1 parent c6c5f66 commit 8acb619

5 files changed

Lines changed: 16 additions & 258 deletions

File tree

‎README.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pcduino fork from https://github.com/pcduino/python-pcduino
2-
SPI fork from https://github.com/lthiery/SPI-Py.git
3-
4-
auto setting pin 10-13 to SPI mode when openSPI
1+
pcduino fork from https://github.com/pcduino/python-pcduino
2+
SPI fork from https://github.com/lthiery/SPI-Py.git
3+
4+
auto setting pin 10-13 to SPI mode when openSPI

‎pcduino/__init__.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
from gpio import *
22
from adc import analog_read
33
from pwm import analog_write
4+
from spi import *
5+

‎pcduino/gpio.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from pinmap import PinMap
22

33

4-
__all__ = ['HIGH', 'LOW', 'INPUT', 'OUTPUT', 'SPI', 'SERIAL', 'digital_write', 'digital_read',
4+
__all__ = ['HIGH', 'LOW', 'INPUT', 'OUTPUT', 'SPI', 'SERIAL', 'INPUT_PU', 'digital_write', 'digital_read',
55
"pin_mode"]
66

77
HIGH = 1
@@ -10,6 +10,7 @@
1010
OUTPUT = 1
1111
SPI = 2
1212
SERIAL = 3
13+
INPUT_PU = 8
1314

1415
gpio_pins = PinMap(
1516
'/sys/devices/virtual/misc/gpio/pin',

‎pcduino/spi.c‎

Lines changed: 0 additions & 249 deletions
This file was deleted.

‎setup.py‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
from setuptools import setup
1+
from setuptools import setup, Extension
2+
3+
spi = Extension('spi', sources = ['pcduino/spi_multi.c'])
24

35
setup(
46
name="pcduino",
57
version="0.1.0",
6-
author="Matthew Hooker",
7-
author_email="[email protected]",
8-
url="https://github.com/pcduino/python-pcduino",
8+
author="kyumoka",
9+
author_email="[email protected]",
10+
url="https://github.com/kyumoka/python-pcduino",
11+
packages=["pcduino"],
12+
ext_modules=[spi],
913
)

0 commit comments

Comments
 (0)